Skip to content

Instantly share code, notes, and snippets.

@commuterjoy
Created November 16, 2013 12:06
Show Gist options
  • Save commuterjoy/7499443 to your computer and use it in GitHub Desktop.
Save commuterjoy/7499443 to your computer and use it in GitHub Desktop.
Using vim to edit multiple files

First we want to open a bunch of files based on some pattern,

vim $(grep -Rl 'commentCount' *)

Then we want to a find & replace across all buffers,

bufdo %s/commentCount/comment-count/ | update
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment