vim-settings/vim/rc/plugins/vim-grepper.rc.vim

28 lines
745 B
VimL
Raw Normal View History

Plug 'mhinz/vim-grepper'
2016-11-15 17:25:41 +00:00
" Grepper settings and shortcuts
let g:grepper = {
\ 'quickfix': 1,
\ 'open': 1,
\ 'switch': 0,
\ 'jump': 0,
2019-10-21 17:50:19 +00:00
\ 'tools': ['git', 'rg', 'ag', 'ack', 'pt', 'grep'],
\ 'dir': 'repo,cwd'
2016-11-15 17:25:41 +00:00
\ }
nmap gs <plug>(GrepperOperator)
xmap gs <plug>(GrepperOperator)
nmap <leader>* :Grepper -cword -noprompt<cr>
2019-10-21 17:50:19 +00:00
" 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
2016-11-15 17:25:41 +00:00
if executable('ag')
2017-01-23 20:18:13 +00:00
command -nargs=+ Ag :GrepperAg <args>
2016-11-15 17:25:41 +00:00
endif
if executable('ack')
2017-01-23 20:18:13 +00:00
command -nargs=+ Ack :GrepperAck <args>
2016-11-15 17:25:41 +00:00
endif