In Ex mode, ##
can be expanded to the files in the args
list when files are expected, see :h cmdline-special
In Ex commands, at places where a file name can be used, the following characters have a special meaning. These can also be used in the expression function expand().
Like !ls ##
will expand ##
But echo ##
will not.
However, if I am going to define my own command, how to tell vim
that I want files here so please expand my ##
?
Is there a way to expand them in place (like how zsh
expands *
when you press Tab after it)?
An example
command! -nargs=1 Echo :exe "echo '" . <q-args> . "'"
Now I want to run Echo I am here ##
with ##
expanded.