How do I repeat my last substitution across the entire file?
g&
The g& command repeats the last substitute command across the entire file.
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.