The basic meta-characters for the replacement pattern are "&" and
"~"; these are given as \& and
\~ when nomagic is set. Each instance
of "&" is replaced by the characters which the regular expression
matched. The meta-character "~" stands, in the replacement
pattern, for the defining text of the previous replacement
pattern. Other meta-sequences possible in the replacement pattern
are always introduced by the escaping character "\".
The sequence \n (where n is an integer between 1 and 9)
is replaced by the text matched by the nth
regular subexpression enclosed between \( and
\). The sequences \u and \l cause
the immediately following character in the replacement to be
converted to uppercase or lowercase respectively if this character is
a letter. The sequences \U and \L turn such
conversion on, either until \E or \e is
encountered, or until the end of the replacement pattern.
|Vi ---> Substitute replacement patterns|
This section is based on "Vi Reference" by Maarten Litmaath et al.
Find this site useful? Want to give something back?
Please notify owners of webpages with outdated links to these pages
© 1993-2001 Christopher C. Taylor