I want to select a block of text (eg. V%
) and use the text as input to a shell command (eg. wc
or pbcopy
) - but I DON'T want to alter the current buffer - I just want to see the output of the command (if any) the continue editting without any changes.
Typing V%!wc
translates to :'<,'>!wc
and switches the block of text for the output of the wc
command.
How do you pipe a chunk of text to an arbitrary shell command without affecting the current buffer?