mirror of
https://github.com/ViViDboarder/vim-settings.git
synced 2024-11-17 23:36:27 +00:00
Update Grepper for better searching
This commit is contained in:
parent
b2c84bf38f
commit
382c3bf129
@ -124,4 +124,3 @@ elseif executable('ag')
|
|||||||
elseif executable('ack')
|
elseif executable('ack')
|
||||||
set grepprg=ack
|
set grepprg=ack
|
||||||
endif
|
endif
|
||||||
" TODO: Add rg
|
|
||||||
|
@ -6,18 +6,23 @@ let g:grepper = {
|
|||||||
\ 'open': 1,
|
\ 'open': 1,
|
||||||
\ 'switch': 0,
|
\ 'switch': 0,
|
||||||
\ 'jump': 0,
|
\ 'jump': 0,
|
||||||
\ 'tools': ['ag', 'ack', 'git', 'pt', 'grep']
|
\ 'tools': ['git', 'rg', 'ag', 'ack', 'pt', 'grep'],
|
||||||
|
\ 'dir': 'repo,cwd'
|
||||||
\ }
|
\ }
|
||||||
nmap gs <plug>(GrepperOperator)
|
nmap gs <plug>(GrepperOperator)
|
||||||
xmap gs <plug>(GrepperOperator)
|
xmap gs <plug>(GrepperOperator)
|
||||||
nmap <leader>* :Grepper -cword -noprompt<cr>
|
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')
|
if executable('ag')
|
||||||
command -nargs=+ Ag :GrepperAg <args>
|
command -nargs=+ Ag :GrepperAg <args>
|
||||||
set grepprg=ag\ --nogroup\ --nocolor
|
|
||||||
endif
|
endif
|
||||||
if executable('ack')
|
if executable('ack')
|
||||||
set grepprg=ack
|
|
||||||
command -nargs=+ Ack :GrepperAck <args>
|
command -nargs=+ Ack :GrepperAck <args>
|
||||||
endif
|
endif
|
||||||
" TODO: Add rg
|
|
||||||
|
Loading…
Reference in New Issue
Block a user