我要填写elsif
在我的 .vimrc
部分下面,谁能帮我正确的 Windows 语法?
if executable( 'ag' )
if has( 'unix' )
let g:ctrlp_user_command = 'ag %s -l --nocolor -g ""'
elsif has( 'win32' )
" ?
endif
endif
Unix 版本在我的 Windows gvim 中不起作用。
最佳答案
除了@amos 的回答之外,您实际上还可以在 CtrlP 中添加更多使用 ag 的内容,如前所述 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
关于vim - 什么是正确的 Vim/Ag g :ctrlp_user_command value for Windows?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28260090/