Vim – Commenting out multiple lines
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.
In other words, substitute the selected start of lines with the # character.