I'm trying to put the output of a command into a QuickFix list when a particular key is pressed. That command takes as its argument the word under the cursor, so my function looks basically like this (example; ls
is not actually my command):
set makeprg=ls\ $*
function MyFunction()
let word = expand("<cword>")
silent make word
copen
endfunction
And what it does is call with the literal word word
. If I use a $
before it, then the literal $
is used also.
How do I put the value of word
into make
instead of those four letters?