so:
this is line 1could be commented by putting the cursor on line 1 and using
this is line 2
this is line three
this is line 4
:.,/three/ s/^/#/g
this is line 1could be commented by putting the cursor on line 1 and using
this is line 2
this is line three
this is line 4
:.,/three/ s/^/#/g
/ STRINGSearch STRING backward:
? STRINGRepeat search:
nRepeat search in opposite direction:
N (SHIFT-n)Replace: Same as with sed, Replace OLD with NEW:
:s/OLD/NEWGlobally (all) on current line:
:s/OLD/NEW/gBetween two lines #,#:
:#,#s/OLD/NEW/gEvery occurrence in file (global):
:%s/OLD/NEW/g