1. Open a file with Vim
2. While having a cursor in a first line you want to comment - enter visual mode (Ctrl + V)
3. Select with arrows a block of code you want to comment.
4. Select Shift+I to put editor in INSERT mode then insert `#` (or any character you like). This will add hash to the first line.
5. Press Esc and it will insert `#` to entire block you have selected