Use ag as ctrlp's search command

This commit is contained in:
Christian Treppo 2013-12-08 13:27:25 +00:00
parent 1dbd30f0ee
commit 10cbcdc7df

View File

@ -1,5 +1,10 @@
let g:ctrlp_custom_ignore = '\.git$\|\.hg$\|\.svn$'
let g:ctrlp_user_command = ['.git', 'cd %s && git ls-files . --cached --exclude-standard --others']
if executable('ag')
" Use ag in CtrlP for listing files. Lightning fast and respects .gitignore
let g:ctrlp_user_command = 'ag %s --files-with-matches -g "" --ignore "\.git$\|\.hg$\|\.svn$"'
" ag is fast enough that CtrlP doesn't need to cache
let g:ctrlp_use_caching = 0
endif
" Default to filename searches - so that appctrl will find application
" controller