To locate instances of particular sets of characters (or strings), use the following commands.
/string search forward for occurrence of string in text
?string search backward for occurrence of string in text
n move to next occurrence of search string
N move to next occurrence of search string in opposite direction
u undo
U undo all the changes
Replace
------------
:%s/oldword/newword/g
:%s/^M//g ---- to replace control-m characters (press ctrl-v& ctrl-m )
look for special characters:
---------------------------------
:set list
/string search forward for occurrence of string in text
?string search backward for occurrence of string in text
n move to next occurrence of search string
N move to next occurrence of search string in opposite direction
u undo
U undo all the changes
Replace
------------
:%s/oldword/newword/g
:%s/^M//g ---- to replace control-m characters (press ctrl-v& ctrl-m )
look for special characters:
---------------------------------
:set list