DEV Community

Discussion on: (Un)Commenting Multiple Lines

Collapse
 
coreyja profile image
Corey Alexander

If you aren't opposed to a plugin, I really like vim-commentary by tpope, for this! Its language aware so it can use the correct comment for the correct language!

github.com/tpope/vim-commentary

With this installed you can do gcc to toggle the comment on a single line, and to do multiple you can select them in visual mode as above, and go gc to either comment or uncomment the lines!