Closed jonstavis closed 8 years ago
I think I found a solution. Leaving answer here in case anyone needs this in the future.
Specifically, I want Ag to search through my PHP /vendor directory which is excluded in .gitignore
So I set
let g:ag_prg='ag -U'
in my .vimrc. The -U option tells Ag to skip vcs ignores. You may add any other command line options that are outlined in the Ag man file.
However, these searches were extremely slow because all of the other ignores in .gitignore were now being searched. To get around this I added these paths to my global ~/.agignore
It seems like Ag search by default ignores directories in .gitignore.
Is there any way to override this behavior and in fact, search through directories that happen to be in a .gitignore file? If so is there a best-practice for this?
Thanks!