I would like to fill in the elsif
in the portion of my .vimrc
below, can anyone help me with the correct Windows syntax?
if executable( 'ag' )
if has( 'unix' )
let g:ctrlp_user_command = 'ag %s -l --nocolor -g ""'
elsif has( 'win32' )
" ?
endif
endif
The Unix version is not working in my Windows gvim.
In addition to @amos's answer, you could actually make a bit more addition to use ag in CtrlP as mentioned here:
" Use The Silver Searcher https://github.com/ggreer/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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With