Use ag firstly for ctrlp in windows too

This commit is contained in:
zhlinh 2015-07-19 20:23:12 +08:00
parent 4f64f56019
commit 1df9d655a8

8
.vimrc
View File

@ -608,15 +608,15 @@
\ 'dir': '\.git$\|\.hg$\|\.svn$',
\ 'file': '\.exe$\|\.so$\|\.dll$\|\.pyc$' }
" On Windows use "dir" as fallback command.
if WINDOWS()
let s:ctrlp_fallback = 'dir %s /-n /b /s /a-d'
elseif executable('ag')
if executable('ag')
let s:ctrlp_fallback = 'ag %s --nocolor -l -g ""'
elseif executable('ack-grep')
let s:ctrlp_fallback = 'ack-grep %s --nocolor -f'
elseif executable('ack')
let s:ctrlp_fallback = 'ack %s --nocolor -f'
" On Windows use "dir" as fallback command.
elseif WINDOWS()
let s:ctrlp_fallback = 'dir %s /-n /b /s /a-d'
else
let s:ctrlp_fallback = 'find %s -type f'
endif