Thursday, July 29, 2010

REPLACE between marks

While using vi, add marks to work with a chunk of lines.

To replace beginning of all lines, between the (inclusive) marks a and b, with ZZZ; we could write

:'a,'bs/^/ZZZ/

Where a has lower line number than b.

No comments:

Post a Comment