From 73a0cb2ab8b39ed1c649567594d397a27cd33c3a Mon Sep 17 00:00:00 2001 From: Yan Pritzker Date: Sun, 15 Dec 2013 15:22:05 -0600 Subject: [PATCH] Fallback to using git ls-files if ag is missing --- vim/settings/ctrlp.vim | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/vim/settings/ctrlp.vim b/vim/settings/ctrlp.vim index 4817321b..391cab66 100644 --- a/vim/settings/ctrlp.vim +++ b/vim/settings/ctrlp.vim @@ -4,6 +4,10 @@ if executable('ag') " ag is fast enough that CtrlP doesn't need to cache let g:ctrlp_use_caching = 0 +else + " Fall back to using git ls-files if Ag is not available + let g:ctrlp_custom_ignore = '\.git$\|\.hg$\|\.svn$' + let g:ctrlp_user_command = ['.git', 'cd %s && git ls-files . --cached --exclude-standard --others'] endif " Default to filename searches - so that appctrl will find application