mirror of
https://github.com/ViViDboarder/vim-settings.git
synced 2024-11-17 23:36:27 +00:00
Add rg to ctrlp configs
This commit is contained in:
parent
2a07143e43
commit
62c65e5d73
@ -129,8 +129,8 @@ command Todo grep TODO
|
|||||||
command TagsUpdate !ctags -R .
|
command TagsUpdate !ctags -R .
|
||||||
|
|
||||||
" Set grepprg
|
" Set grepprg
|
||||||
if executable("rg")
|
if executable('rg')
|
||||||
set grepprg=rg\ --vimgrep\ --no-heading
|
set grepprg=rg\ --vimgrep\ --no-heading\ --color=never
|
||||||
set grepformat=%f:%l:%c:%m,%f:%l:%m
|
set grepformat=%f:%l:%c:%m,%f:%l:%m
|
||||||
elseif executable('ag')
|
elseif executable('ag')
|
||||||
set grepprg=ag\ --vimgrep\ --nogroup\ --nocolor
|
set grepprg=ag\ --vimgrep\ --nogroup\ --nocolor
|
||||||
|
@ -41,11 +41,13 @@ nnoremap <leader>t :CtrlPBufTag<CR>
|
|||||||
nnoremap <leader>u :CtrlPCurFile<CR>
|
nnoremap <leader>u :CtrlPCurFile<CR>
|
||||||
nnoremap <silent> <F2> :CtrlPBuffer<CR>
|
nnoremap <silent> <F2> :CtrlPBuffer<CR>
|
||||||
|
|
||||||
" Special stuff for The Silver Searcher
|
" Use custom search command
|
||||||
if executable('ag')
|
if executable('rg')
|
||||||
" use ag for CtrlP
|
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 ""'
|
let g:ctrlp_user_command['fallback'] = 'ag %s -l --depth 5 --nocolor --nogroup -g ""'
|
||||||
" ag is fast enough we don't need cache
|
" ag is fast enough we don't need cache
|
||||||
let g:ctrlp_use_caching = 0
|
let g:ctrlp_use_caching = 0
|
||||||
endif
|
endif
|
||||||
" TODO: Add rg support
|
|
||||||
|
Loading…
Reference in New Issue
Block a user