Last active
October 12, 2015 08:18
-
-
Save coffeencoke/3998621 to your computer and use it in GitHub Desktop.
vim find and replace
This file contains hidden or 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
# Just do it | |
find . -type f -exec sed -i '' 's/from/to/g' {} \; |
This file contains hidden or 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
# So that you can confirm each instance before replacing | |
:set autowrite | |
:args **/*.rb | |
:argdo %s/from/to/gc |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment