Next: Search and Replace, Previous: Deleting Text, Up: Text Handling
In Emacs, ‘\&’ stands for the last matched expression, so s/[ab]+/\&\&/ will double the string matched by [ab]. Viper doesn't treat ‘&’ specially, unlike Vi: use ‘\&’ instead.
Viper does not parse search patterns and does not expand special symbols found there (e.g., ‘~’ is not expanded to the result of the previous substitution).
Note: The newline character (inserted as C-qC-j)
can be used in <repl>.
In Vi state, these keys are bound to functions that peruse the history of destructive Vi commands. See Viper Specials, for details.