vim-grepper icon indicating copy to clipboard operation
vim-grepper copied to clipboard

Can I pass multiple arguments to grepprg?

Open sihunqu123 opened this issue 4 years ago • 0 comments

I know we can pass the $*(the grep text) to grepprg, but can we also specify the root-directory I want to grep from? i.e.

let g:grepper = {
    \ 'grep': {
    \   'grepprg': 'grep -Rn arg0_grep_text  arg1_the_folder'
    \ },
    \ 'tools': ['grep']
    \}

Then in vim:

:Grepper -tool grep -quickfix -highlight 
# in prompt
grep -Rn arg0_grep_text  arg1_the_folder>  my-text-for-grep my-folder-path-for-grep

The arg1_the_folder really matters when your project too big and u need to limit the result in a given folder.

sihunqu123 avatar Aug 10 '21 13:08 sihunqu123