vim-grepper
vim-grepper copied to clipboard
Can I pass multiple arguments to grepprg?
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.