Closed abacha closed 4 months ago
I have this shortcut in my vimrc
nnoremap <leader>k :exe 'Ag!' expand('<cword>')<cr>
It searches the word under cursor. For highlighted word this is less easy
This works for me:
vnoremap <leader>G "hy:Ag "<C-r>h"<CR>
I'm not sure if I'm missing something? The comment thread above implies a significant amount of difficulty that I'm just not seeing.
Is it possible to bind a shortcut (ie leader G) to do :Ag?