DEV Community

HaxNet
HaxNet

Posted on • Edited on

1

VIM - commenting using visual block

Wow I haven't been on here for a long time. Actually, I haven't been using my linux OS for a while due to work.

It has been so long that I forgot how to use certain functions in Vim that would make a world of difference.

So I switched from Urxvt to Alacritty (terminal emulator)

I wanted to comment multiple things in the config file and didn't want to go through multiple lines

So if you have 10 or 20 lines and you need them all to be commented out, simply do the following in

Ctrl-v and press j until you want all the lines are selected to be commented out

then press Shift-i

this will allow you to insert something, but it will be for the first line. Once you are done inserting just press ESC and it will autofill.

Try it out and let me know.

Click here on how to uncomment using visual-block

Top comments (0)

👋 Kindness is contagious

Engage with a wealth of insights in this thoughtful article, cherished by the supportive DEV Community. Coders of every background are encouraged to bring their perspectives and bolster our collective wisdom.

A sincere “thank you” often brightens someone’s day—share yours in the comments below!

On DEV, the act of sharing knowledge eases our journey and forges stronger community ties. Found value in this? A quick thank-you to the author can make a world of difference.

Okay