Show full output of command :hi
in scratch window:
:Redir hi
Show full output of command :!ls -al
in scratch window:
:Redir !ls -al
Evaluate current line with node
and show full output in scratch window:
" current line
console.log(Math.random());
" Ex command
:.Redir !node
" scratch window
0.03987581000754448
Evaluate visual selection + positional parameters with bash
and show full output in scratch window:
" content of buffer
echo ${1}
echo ${2}
" Ex command
:%Redir !bash -s foo bar
" scratch window
foo
bar
@nebbish The use case for
-bar
is to allow things like:With
-bar
I can "postprocess" the buffer on the command-line using Vim tools. That's the whole point.The problem is that I overlooked this sentence from
:help :command-bar
:which is not super intuitive when using something called
-bar
.Anyway, right now I don't see a possible middle ground:
-bar
prevents it.For now, I think I'm going to keep the
-bar
and provide a non-bar
alternative.As for your escaping snippets… my gists often miss that kind of refinement because I usually stop at "works for me" and "me". A plugin would be treated differently :-). It seems to work fine on my end so I will add it ASAP.
Thank you.