How to Comment Multiple Lines at Once in Vim

PHOTO EMBED

Sun Jun 05 2022 23:43:21 GMT+0000 (Coordinated Universal Time)

Saved by @atatimelikethis #shell #bash #zsh #vim #nvim

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.
content_copyCOPY

https://linuxhint.com/comment-multiple-lines-vim/