mhinz / vim-grepper

:space_invader: Helps you win at grep.
MIT License
1.22k stars 58 forks source link

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

Open dlants opened 1 year ago

dlants commented 1 year ago

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 commented 9 months ago

: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>