Sysadmin Notebook
Sunday 22 May 2011
Comment multiple lines in VI
Instead of counting lines ( using: .,+N ) one could also use a search ( .,/WORDONTHELASTLINE/ ),
so:
this is line 1
this is line 2
this is line three
this is line 4
could be commented by putting the cursor on line 1 and using
:.,/three/ s/^/#/g
Possibly Related Posts
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment