DEV Community 👩‍💻👨‍💻

HaxNet
HaxNet

Posted on • Updated on

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)

Every Week

We have a Welcome Thread where we invite members to tell us a bit about themselves. Join the conversation with us!