Vimgrep
- Open vim and make sure you are in the top level folder of your project by typing :pwd
- Then type :vimgrep YourPattern **/*.php
- To open your search results in their own buffer type :copen
The **/ recursively searches through all your directories for you pattern. :copen opens the search results in their own buffer. You can use the arrow keys to move up and down through the list and hit enter to have it open that result in the main buffer. You can also use :cnext and :cprev to move to the next and previous items in the list. Perhaps you might bind those to keyboard shortcuts so you can move through the search results quickly.
Comments
Post a Comment