I don't think this question has been answered.
I know that I can get into bash while in vim via:
and then use bash commands as normal, and get back out using fg.
What I am wondering is, can I execute a line of code from a script in vim straight to Bash, say in a separate buffer, without having to copy it (via highlighting in visual mode for example) from vim, then going to a terminal and pasting it and hitting enter etc.?
i.e. is there a nice quick vimmish way of doing this without all the fluff?
Arguably easiest way:
!and then press
", which will paste the content of the unnamed register to the cmdline (which will contain the text you wanted to execute)