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

add example of how to grep in the directory of current file. #260

Open
dlants opened this issue Apr 17, 2023 · 1 comment
Open

add example of how to grep in the directory of current file. #260

dlants opened this issue Apr 17, 2023 · 1 comment

Comments

@dlants
Copy link

dlants commented Apr 17, 2023

I've been trying to figure out how to wrangle Grepper w/ something like %:p:h to limit grep results to only those that are in the directory (or subdirectories) of the current file.

Still haven't figured it out, but maybe someone else has?

I think this would be a great example to add to https://github.com/mhinz/vim-grepper/wiki/example-configurations-and-mappings

@lbonn
Copy link
Collaborator

lbonn commented Jan 31, 2024

:Grepper -dir file?

That's the default I use when I am in a dirvish buffer:

autocmd FileType dirvish nmap <silent><buffer> <Leader>sp :Grepper -dir file -tool git<CR>

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

2 participants