I know that with this command:
I can execute current line and print the output in the next line (actually it copies the current line to the next line, executes it, and replaces it with the output), to get from this:
to this (after the command above):
echo "Hello" Hello
I also know that I can use this command:
To execute the selected lines (plural) and show the output in the window below the editor.
What I want is to be able to select multiple lines, execute it in bash, and print the output in vim. How can I do that?
So desired behavior is to get from:
echo \ -e "Hello\nWorld" echo "Hi"
echo \ -e "Hello\nWorld" echo "Hi" Hello World Hi
yis enough to copy). If I change it to
yyand did not select a line, it works. My question still stand then, how to select a few lines, and then use a shortcut to perform the command.