Performing find and replace operations across a project is something I used to do regularly in various editors, but I never took the time to learn how to do it in Vim. I finally learned how to do this today, and it turns out it's easy.
The article goes into more detail, but here are the basic commands:
The first line sets up what files to perform the search against so it can be scoped to a certain parts of the project. %s performs the substitution, and update saves all modified files after performing the replacements.
Performing find and replace operations across a project is something I used to do regularly in various editors, but I never took the time to learn how to do it in Vim. I finally learned how to do this today, and it turns out it's easy.
The article goes into more detail, but here are the basic commands:
The first line sets up what files to perform the search against so it can be scoped to a certain parts of the project.
%sperforms the substitution, andupdatesaves all modified files after performing the replacements.