Last active
July 23, 2018 16:08
-
-
Save gzagatti/3b652abf560d52e289d3f9b2b79293af to your computer and use it in GitHub Desktop.
Change multiple files at once in Vim.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set aw | |
" There are two different approaches for finding the target files | |
" execute "args" join(systemlist("ag -l pattern path/to/files"), " ") | |
args `ag -l pattern path/to/files` | |
argdo %s/pattern/new/g | w |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment