First things first, I want to use ag to search through my project files. Coming from fzf, I like to have two bindings for this -- one that respects my projects .gitignore
and one that does not. The latter is helpful if I want to examine a built file or look at a node_module dependency while working on my js project.
I use an alias for file_rec
source to toggle the -u
flag on ag
. Now, <C-P>
searches in my git files, and <C-O>
searches everything.
" denite file search (c-p uses gitignore, c-o looks at everything)
map <C-P> :DeniteProjectDir -buffer-name=git -direction=top file_rec/git<CR>
map :DeniteProjectDir -buffer-name=files -direction=top file_rec