Link Search Menu Expand Document

vim

Search and replace

Vim provides the :s (substitute) command for search and replace

  • Find each occurrence of foo in all lines, and replace it with bar.
:%s/foo/bar/g