Kamath · @kamath
63 followers · 92 posts · Server mastodon.online

I am not sure how I missed this simple way to comment multiple lines in VIM for so long.

Just enter the following in the command mode (assuming # is the comment character):
:[startline],[endline]s/^/#

For example:
:10,20s/^/#

#VimEditor #linux #commandline #vim

Last updated 2 years ago

OSTechNix · @ostechnix
520 followers · 1486 posts · Server floss.social
OSTechNix · @ostechnix
520 followers · 1486 posts · Server floss.social
OSTechNix · @ostechnix
520 followers · 1486 posts · Server floss.social
OSTechNix · @ostechnix
520 followers · 1486 posts · Server floss.social

How To Comment Out Multiple Lines At Once In Vim Editor
ostechnix.com/comment-multiple

#Linux #vimtips #VimEditor #vim

Last updated 3 years ago

Jona3717🐧 · @jona3717
59 followers · 641 posts · Server mastodon.social
Jona3717🐧 · @jona3717
59 followers · 641 posts · Server mastodon.social