vimgrep
How to search files in fatest way?
Recursive searchEdit
You can use ** in the file pattern to search recursively. For example, to search for all lines containing "dostuff()" in all .c files in the parent directory and all its subdirectories, use:
:vimgrep /dostuff()/j ../**/*.c
Disabling autocmds for fast searchesEdit
Using vimgrep to search hundreds of files can be slow. A search taking only a few seconds using an external grep program might take nearly a minute with vimgrep. One reason for this is that vimgrep uses Vim's procedures to read files, which can involve execution of several autocommands.
Just use noautocmd avoiding autocommands called, fatest way.
:noautocmd vimgrep /{pattern}/[flags] {file(s)}