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