How do I change the case of text during a search and replace?
:%s/\<word\>/\u&/g
Vim's substitute command supports case conversion modifiers in the replacement string.
:%s/\<word\>/\u&/g
Vim's substitute command supports case conversion modifiers in the replacement string.
g&
The g& command repeats the last substitute command across the entire file.
:%Subvert/old/new/g
The vim-abolish plugin by Tim Pope provides the :Subvert command (abbreviated :S), which performs search-and-replace operations that automatically handle every
:%s/old/new/g
The :%s/old/new/g command replaces all occurrences of old with new across every line in the file.