I'd like to edit shell commands from vim, and execute them from vim. Currently I use
!!sh (pipes current line to command sh), but this removes the line itself.
Is it possible to execute the command in a shell, and paste the result below that line?
As Clausi pointed out,
To save keystrokes you can map this action by adding the next line in the
This way everytime F5 is pressed in command mode, the line will be executed and the result will be shown below the line.
Type shell command in the buffer, for instance