• Wincent
    Open
  • Blog
  • Wiki
  • Snippets
  • Tags
  • Search

Find and replace across all buffers in VimEdit

Created 7/7/2010, updated 5/18/2017

Find and replace across all open buffers:

:bufdo %s/pattern/substituion/gce | update

The same, but across all *.rb files in the current directory hierarchy:

:args **/*.rb
:argdo %s/pattern/substitution/gce | update

Alternatively, use a plug-in like Ferret.

See also

  • "Search and replace in all buffers": http://vim.wikia.com/wiki/VimTip1512
  • Search and replace in multiple files with a Perl one-liner
  • vim
  • recipe
  • wiki
Site
  • About
  • Blog
  • Wiki
  • Snippets
  • Tags
  • Search
External
  • GitHub
  • Twitter
  • YouTube
  • Facebook
  • LinkedIn
Colophon

Made by Greg Hurrell using React, Relay and GraphQL (with help from Git, Redis and Neovim).