Sometimes you want to replace one string with another. This is done with the ex command "s". The form of the replacement is :
: line_range s/old/new/gex ( replace foo with bar from line 10 to 20 ) :
:10,20s/foo/bar/gYou can use visual mode to select the lines, when you type the colon to start the command it will use symbols for the visual line range.
No comments:
Post a Comment