Motion Commands Vi Commands Modifying Commands
Following commands are available for searching and replacing.
/ string RET
|
Search the first occurrence of the string string forward starting
from point. Given a count n, the n-th occurrence of
string will be searched. If the variable |
? string RET
|
Same as /, except that search is done backward
(vip-search-backward ).
|
n | Search the previous search pattern in the same direction as before
(vip-search-next ).
|
N | Search the previous search pattern in the opposite direction
(vip-search-Next ).
|
C-s | Search forward incrementally. See GNU Emacs Manual for details
(isearch-forward ).
|
C-r | Search backward incrementally (isearch-backward ).
|
R string RET newstring | There are two modes of replacement, vanilla and regular expression.
If the mode is vanilla you will get a prompt `Replace string: ',
and if the mode is regular expression you will ge a prompt
`Replace regexp: '. The mode is initially vanilla, but you can
toggle these modes by giving a null string as string. If the mode is
vanilla, this command replaces every occurrence of string with
newstring. If the mode is regular expression, string is
treated as a regular expression and every string matching the regular
expression is replaced with newstring (vip-replace-string ).
|
Q string RET newstring | Same as R except that you will be asked form confirmation before each
replacement
( vip-query-replace ).
|
r ch | Replace the character point is looking at by the character ch. Give
count, replace that many characters by ch (vip-replace-char ).
|