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

Oldest comments (0)

Timeless DEV post...

Git Concepts I Wish I Knew Years Ago

The most used technology by developers is not Javascript.

It's not Python or HTML.

It hardly even gets mentioned in interviews or listed as a pre-requisite for jobs.

I'm talking about Git and version control of course.

One does not simply learn git