Press CTRL + V to enable Visual Mode.
Using the up and down arrow key, highlight the lines you wish to comment out.
Once you have the lines selected, press the SHIFT + I keys to enter insert mode.
Enter your command symbol, for example, # sign, and press the ESC key. Vim will comment out all the highlighted lines.