11
3
for example suppose I did
:let foo=pattern
and now I want to perform Ggrep patter
but use variable foo
instead of the literal patter
string.
:echo foo
outputs pattern
, but
:Ggrep foo
just looks for foo
UPDATE:
building a string of command and then running :execute on it is not a solution, its a hack. And it breaks with any non-trivial variable values.
example command is wrong. it should be let foo='pattern'. Say that :execute is a hack is totally wrong. That's the solution: You want vim to evaluate the command before execute it – albfan – 2018-03-09T19:51:25.757
what is
Ggrep
(capital G?)? – akira – 2011-08-08T11:30:35.387git grep from 'fugutive' vim plugin – Vitaly Kushner – 2011-08-09T10:08:04.600