Return to Snippet

Revision: 52694
at October 30, 2011 00:20 by pflangan

Initial Code
Vi: Search and Replace
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

Initial URL

Initial Description

Initial Title
search and replace vi

Initial Tags
search, replace

Initial Language