:s/old/new/g

Category: Vim/Neovim

:s/old/new/g

Replace all occurrences of 'old' with 'new' on current line

Replaces all occurrences of 'old' with 'new' on the current line only.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.