Vi: Search and Replace
Vi: Search and Replace
Extracted Page: http://www.felixgers.de/teaching/emacs/vi_search_replace.html
Vi: Search and Replace
Vi: Search and Replace
Contents /
Previous /
Next
Replace: Same as with sed, Replace OLD with NEW:
Change to normal mode with <ESC>.
Search (Wraped around at end of file):
Search STRING forward : / STRING. Search STRING backward: ? STRING. Repeat search: n Repeat search in opposite direction: N (SHIFT-n)
Replace: Same as with sed, Replace OLD with NEW:
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
Additional text has been truncated due to copyright reasons. Things without URLs and private things don't get truncated.
- No Things found. nader hasn't shared anything.