Vim 9 · Searching and replacing

Replace in the whole file

Replace every occurrence of old with new.

:%s/old/new/g

Official Vim 9 documentation

More searching and replacing commands

All searching and replacing commands · Vim 9 cheatsheet

Was this page helpful?