Jul
31
2008
Another useful command to add to my VI command vocabulary
Posted by: Kenneth in Geekiness, Randomness, Work, tags: search and replace, viBefore this, i only know how to do a normal search string and searching for the string through the whole document. Now i can search and replace all.. Yay!
First occurrence on current line: :s/OLD/NEW Globally (all) on current line: :s/OLD/NEW/g Between two lines #,#: :#,#s/OLD/NEW/g Every occurrence in file: :%s/OLD/NEW/g
Entries (RSS)