There are two ways to do this without a vim plugin:
- Select your lines with VISUAL BLOCK (CTRL-V), then press I to insert before all highlighted lines. Next type your comment character (#, ;, depending on the language), then press ESC twice.
- Select your lines with VISUAL LINE (SHIFT-V) then type:
In other words, substitute the selected start of lines with the # character.