From 10cbcdc7df900797be39ed1a09642a25d585a309 Mon Sep 17 00:00:00 2001 From: Christian Treppo Date: Sun, 8 Dec 2013 13:27:25 +0000 Subject: [PATCH] Use ag as ctrlp's search command --- vim/settings/ctrlp.vim | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/vim/settings/ctrlp.vim b/vim/settings/ctrlp.vim index 2818bfea..64e0cc13 100644 --- a/vim/settings/ctrlp.vim +++ b/vim/settings/ctrlp.vim @@ -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