Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can I pass multiple arguments to grepprg? #249

Open
sihunqu123 opened this issue Aug 10, 2021 · 0 comments
Open

Can I pass multiple arguments to grepprg? #249

sihunqu123 opened this issue Aug 10, 2021 · 0 comments

Comments

@sihunqu123
Copy link

sihunqu123 commented Aug 10, 2021

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant