Skip to content

Instantly share code, notes, and snippets.

@grillermo
Created March 6, 2015 17:50
Show Gist options
  • Save grillermo/3e318d224b1ddcf1bafd to your computer and use it in GitHub Desktop.
Save grillermo/3e318d224b1ddcf1bafd to your computer and use it in GitHub Desktop.
Ctrlp using ag the silver searcher
"" The Silver Searcher
if executable('ag')
" Use ag over grep
set grepprg=ag\ --nogroup\ --nocolor
" Use ag in CtrlP for listing files. Lightning fast and respects .gitignore
let g:ctrlp_user_command = 'ag %s -l --nocolor -g ""'
" " ag is fast enough that CtrlP doesn't need to cache
let g:ctrlp_use_caching = 0
endif
@mujz
Copy link

mujz commented Aug 6, 2017

Does this allow you to use ag to search for files? Do you know if CtrlP can used to search file contest with ag?
Thanks!

@grillermo-everlyhealth
Copy link

yes it does

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment