More clean-ups
Better Cross-platform stuff https://vimways.org/2018/from-vimrc-to-vim/
This commit is contained in:
21
plugin/grep.vim
Normal file
21
plugin/grep.vim
Normal file
@@ -0,0 +1,21 @@
|
||||
" Set up CtrlP with faster alternative, if possible
|
||||
if executable('ag')
|
||||
" Use The Silver Searcher https://github.com/ggreer/the_silver_searcher
|
||||
set grepprg=ag\ --nogroup\ --nocolor
|
||||
" Use ag in CtrlP for listing files. Lightning fast, respects .gitignore
|
||||
" and .agignore. Ignores hidden files by default.
|
||||
let g:ctrlp_user_command = 'ag %s -l --nocolor -f -g ""'
|
||||
let g:ctrlp_use_caching = 0
|
||||
finish
|
||||
endif
|
||||
|
||||
if executable('rg')
|
||||
set grepprg=rg\ --color=never
|
||||
|
||||
let g:ctrlp_user_command = 'rg %s --files --color=never --glob ""'
|
||||
let g:ctrlp_use_caching = 0
|
||||
finish
|
||||
endif
|
||||
|
||||
"ctrl+p ignore files in .gitignore
|
||||
let g:ctrlp_user_command = ['.git', 'cd %s && git ls-files . -co --exclude-standard', 'find %s -type f']
|
||||
Reference in New Issue
Block a user