I want to :Ggrep
not from the git root directory but only in the directory the current file is open in vim.
I tried :Ggrep search_key .
, but it still looks from the git root.
Even :Git grep search_key .
does the same as :Ggrep
I want to :Ggrep
not from the git root directory but only in the directory the current file is open in vim.
I tried :Ggrep search_key .
, but it still looks from the git root.
Even :Git grep search_key .
does the same as :Ggrep
.
would expand to the current working directory iirc. Instead you should do something like this :
:Ggrep search_key <C-R>=expand('%:h')<CR><CR>