From 382c3bf129467f1be7bc6d272150f8cd70cfed6c Mon Sep 17 00:00:00 2001 From: ViViDboarder Date: Mon, 21 Oct 2019 10:50:19 -0700 Subject: [PATCH] Update Grepper for better searching --- vim/rc/input.rc.vim | 1 - vim/rc/plugins/vim-grepper.rc.vim | 15 ++++++++++----- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/vim/rc/input.rc.vim b/vim/rc/input.rc.vim index 6e63e35..60221fa 100644 --- a/vim/rc/input.rc.vim +++ b/vim/rc/input.rc.vim @@ -124,4 +124,3 @@ elseif executable('ag') elseif executable('ack') set grepprg=ack endif -" TODO: Add rg diff --git a/vim/rc/plugins/vim-grepper.rc.vim b/vim/rc/plugins/vim-grepper.rc.vim index 855f082..a0304ed 100644 --- a/vim/rc/plugins/vim-grepper.rc.vim +++ b/vim/rc/plugins/vim-grepper.rc.vim @@ -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 (GrepperOperator) xmap gs (GrepperOperator) nmap * :Grepper -cword -noprompt -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 +endif if executable('ag') command -nargs=+ Ag :GrepperAg - set grepprg=ag\ --nogroup\ --nocolor endif if executable('ack') - set grepprg=ack command -nargs=+ Ack :GrepperAck endif -" TODO: Add rg