The TComment plugin is a must-have for every Vim user. It does just one thing and does it well: comment or uncomment lines of code in any language.
To comment or uncomment a few lines of code, mark the lines in visual mode. You can do this by pressing Shift-V on the first line and then moving down by pressing j. After that, press gc to comment or uncomment those lines. That is it! 🙂
Tried with: Vim 7.3 and Ubuntu 12.04 LTS