Update Grepper for better searching

This commit is contained in:
ViViDboarder 2019-10-21 10:50:19 -07:00
parent b2c84bf38f
commit 382c3bf129
2 changed files with 10 additions and 6 deletions

View File

@ -124,4 +124,3 @@ elseif executable('ag')
elseif executable('ack')
set grepprg=ack
endif
" TODO: Add rg

View File

@ -6,18 +6,23 @@ let g:grepper = {
\ 'open': 1,
\ 'switch': 0,
\ 'jump': 0,
\ 'tools': ['ag', 'ack', 'git', 'pt', 'grep']
\ 'tools': ['git', 'rg', 'ag', 'ack', 'pt', 'grep'],
\ 'dir': 'repo,cwd'
\ }
nmap gs <plug>(GrepperOperator)
xmap gs <plug>(GrepperOperator)
nmap <leader>* :Grepper -cword -noprompt<cr>
command! Todo Grepper -noprompt -query TODO
" Override Todo command to use Grepper
command! Todo :Grepper -noprompt -query TODO
" Make some shortands for various grep programs
if executable('rg')
command -nargs=+ Rg :GrepperRg <args>
endif
if executable('ag')
command -nargs=+ Ag :GrepperAg <args>
set grepprg=ag\ --nogroup\ --nocolor
endif
if executable('ack')
set grepprg=ack
command -nargs=+ Ack :GrepperAck <args>
endif
" TODO: Add rg