Searches the project using :GG <search>
and show it in a new buffer. Inspired by Sublime Text's Find in Files feature.
Install using vim-plug:
Plug 'rstacruz/vim-gitgrep'
Search using :GG
:
:GG hello
Read the documentation:
:help gitgrep
This will bind leaderg to search the current word under the cursor, similar to pressing *.
nnoremap <leader>* :GG! <C-r><C-w><CR>
vnoremap <leader>* y:GG! <C-r>"<C-b><CR>
This will bend leader/ to put :GG!
in the command line, ready to accept input.
nnoremap <leader>/ :GG!<space>
❤️ MIT