This command works as expected:
command! vimgrep !vim "+silent grep %a"
I'm trying to replace %a with %c in a mapping. How can I make this mapping work?
%a
%c
nnoremap <wait> <help> ,v :execute "!vim '+silent grep %c' >/dev/null 2>&1"<CR>
Greetings
This works in my tests:
:nnoremap <wait> <help> ,v :execute "!vim '+silent grep '%c' *' 2>&1"<CR>
Changes:
>/dev/null
*
:grep