diff --git a/vim/rc/input.rc.vim b/vim/rc/input.rc.vim index aab409c..881d692 100644 --- a/vim/rc/input.rc.vim +++ b/vim/rc/input.rc.vim @@ -129,8 +129,8 @@ command Todo grep TODO command TagsUpdate !ctags -R . " Set grepprg -if executable("rg") - set grepprg=rg\ --vimgrep\ --no-heading +if executable('rg') + set grepprg=rg\ --vimgrep\ --no-heading\ --color=never set grepformat=%f:%l:%c:%m,%f:%l:%m elseif executable('ag') set grepprg=ag\ --vimgrep\ --nogroup\ --nocolor diff --git a/vim/rc/plugins/ctrlp.rc.vim b/vim/rc/plugins/ctrlp.rc.vim index eefb514..541157d 100644 --- a/vim/rc/plugins/ctrlp.rc.vim +++ b/vim/rc/plugins/ctrlp.rc.vim @@ -41,11 +41,13 @@ nnoremap t :CtrlPBufTag nnoremap u :CtrlPCurFile nnoremap :CtrlPBuffer -" Special stuff for The Silver Searcher -if executable('ag') - " use ag for CtrlP +" Use custom search command +if executable('rg') + let g:ctrlp_user_command['fallback'] = 'rg %s --files --color=never --glob ""' + " rg is fast enough we don't need cache + let g:ctrlp_use_caching = 0 +elseif executable('ag') let g:ctrlp_user_command['fallback'] = 'ag %s -l --depth 5 --nocolor --nogroup -g ""' " ag is fast enough we don't need cache let g:ctrlp_use_caching = 0 endif -" TODO: Add rg support