Tuesday, March 13, 2018

Back to Basics: comment multiple lines on vi

You can do it with the following command to comment lines 1 to 10 (inclusive):
:1,10s/^/#
for comment, and for uncomment:
:1,10s/^#/

No comments: