Closed ahmedelgabri closed 6 years ago
Your \
mapping is wrong. -query
is used for the actual search query, not for options. I'll alter the doc to make this point clearer.
Use something like this instead:
nnoremap \ :silent! packadd vim-grepper<cr><bar>:Grepper -side -noprompt -tool rg -grepprg rg -H --vimgrep --no-heading --hidden<space>
This fixes the mapping but is quite long. You might want to remove the -nompromt
and use Grepper's prompt instead. (And maybe even let g:grepper.simple_prompt = 1
for an even shorter prompt.)
I think :packadd
already sources plugin/grepper.vim
, so an alternative would be changing the default grepprg for rg:
nnoremap \ :silent! packadd vim-grepper<cr><bar>let g:grepper.rg.grepprg .= ' --hidden'<bar>Grepper -side -tool rg --query<space>
HTH
I fixed the doc. Thanks for bringing this up! ✨
Thanks, I tried both but it seems the second one deosn't work
nnoremap \ :silent! packadd vim-grepper<cr><bar>let g:grepper.rg.grepprg .= ' --hidden'<bar>Grepper -side -tool rg --query<space>
All I get back is this in the command bar at the bottom
:silent! packadd vim-grepper
I found the issue, you missed the :
before the let
:) works fine, thanks again.
I'm getting this error whenever I use
-side
& search while on an empty buffer or a Startify buffer.But if I run the same command on a non-empty buffer it opens this instead. Which is the Quickfix & the side buffer but at the bottom of the window
This is my grepper settings