mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-02-03 00:50:05 +08:00
Use rg for deinte grep by default
This commit is contained in:
parent
9b30006891
commit
649d913015
@ -36,7 +36,7 @@ if !s:sys.isWindows
|
|||||||
" For ripgrep
|
" For ripgrep
|
||||||
" Note: It is slower than ag
|
" Note: It is slower than ag
|
||||||
call denite#custom#var('file_rec', 'command',
|
call denite#custom#var('file_rec', 'command',
|
||||||
\ ['rg', '--files', '--glob', '!.git', '']
|
\ ['rg', '--hidden', '--files', '--glob', '!.git', '']
|
||||||
\ + zvim#util#Generate_ignore(g:spacevim_wildignore, 'rg')
|
\ + zvim#util#Generate_ignore(g:spacevim_wildignore, 'rg')
|
||||||
\ )
|
\ )
|
||||||
elseif executable('ag')
|
elseif executable('ag')
|
||||||
@ -57,7 +57,26 @@ endif
|
|||||||
|
|
||||||
|
|
||||||
" FIND and GREP COMMANDS
|
" FIND and GREP COMMANDS
|
||||||
if executable('ag')
|
if executable('rg')
|
||||||
|
" Ripgrep command on grep source
|
||||||
|
call denite#custom#var('grep', 'command', ['rg'])
|
||||||
|
call denite#custom#var('grep', 'default_opts',
|
||||||
|
\ ['--vimgrep', '--no-heading'])
|
||||||
|
call denite#custom#var('grep', 'recursive_opts', [])
|
||||||
|
call denite#custom#var('grep', 'pattern_opt', ['--regexp'])
|
||||||
|
call denite#custom#var('grep', 'separator', ['--'])
|
||||||
|
call denite#custom#var('grep', 'final_opts', [])
|
||||||
|
|
||||||
|
elseif executable('pt')
|
||||||
|
" Pt command on grep source
|
||||||
|
call denite#custom#var('grep', 'command', ['pt'])
|
||||||
|
call denite#custom#var('grep', 'default_opts',
|
||||||
|
\ ['--nogroup', '--nocolor', '--smart-case'])
|
||||||
|
call denite#custom#var('grep', 'recursive_opts', [])
|
||||||
|
call denite#custom#var('grep', 'pattern_opt', [])
|
||||||
|
call denite#custom#var('grep', 'separator', ['--'])
|
||||||
|
call denite#custom#var('grep', 'final_opts', [])
|
||||||
|
elseif executable('ag')
|
||||||
call denite#custom#var('grep', 'command', ['ag'])
|
call denite#custom#var('grep', 'command', ['ag'])
|
||||||
call denite#custom#var('grep', 'recursive_opts', [])
|
call denite#custom#var('grep', 'recursive_opts', [])
|
||||||
call denite#custom#var('grep', 'pattern_opt', [])
|
call denite#custom#var('grep', 'pattern_opt', [])
|
||||||
|
Loading…
Reference in New Issue
Block a user