Skip to content

Instantly share code, notes, and snippets.

@elainemckinley
Created May 11, 2015 16:09
Show Gist options
  • Save elainemckinley/6b7ba4da6a51e7f0bf97 to your computer and use it in GitHub Desktop.
Save elainemckinley/6b7ba4da6a51e7f0bf97 to your computer and use it in GitHub Desktop.
Search and replace in multiple files with Vim
  1. Enter vi edit mode for multiple files:
$ ○ → vi webapps/*.xml
5 files to edit
  1. See all files you're editing: :ls
  2. Search and replace across all files: :argdo %s/old-foo/new-foo/ge
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment