I have a quite large directory that I frequently need to search through for specific lines. Currently I simply use the built in grep
:
:vim "search" **/*.cpp | cw
The problem is that going through all files in the repo takes ~1-2 minutes normally due to having to the OS globbing all files, and it really slows down development. On the command line, I can store file paths in a file and use them without having to reindex everytime:
> find . -type f -name "*.cpp" > cppfiles
> grep "search" `cat cppfiles` # possible to reuse the index files for multiple searches. Goes _a lot_ faster.
Can I do the same thing with the built-in search?