After switching to Vim from Sublime (via a brief stint on Atom) there’s one feature that I used infrequently, but was incredibly invaluable when needed and that Recursive find & replace.
I wish there was a simple shift+cmd+f
to bring it up, but here’s how to achieve something similar in Vim.
Populate Vim args
:
:args `find <dir_to_look_in> -type f`
Find & replace:
:argdo %s/<replace_this>/<with_this>/gce | update
g
- Change all occurrences on each linec
- Confirm before replacinge
- Skipspattern not found
errors| update
- Saves buffer after applying change
Alternatively, you could just use vim-easygrep…