let ctrlp search for hidden files while exclude .git

This commit is contained in:
hophacker 2019-05-05 19:29:50 +08:00
parent a86ab1fdb1
commit 47c7e8a9eb

View File

@ -3,13 +3,13 @@ if exists("g:ctrlp_user_command")
endif
if executable('rg')
" Use rg in CtrlP for listing files. Lightning fast and respects .gitignore
let g:ctrlp_user_command = 'rg --files --smart-case %s'
let g:ctrlp_user_command = 'rg --hidden --files -g \!.git --smart-case %s'
" rg is fast enough that CtrlP doesn't need to cache
let g:ctrlp_use_caching = 0
elseif 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$"'
let g:ctrlp_user_command = 'ag %s --hidden --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