This question is similar to Vim: execute current file?, but instead of executing the current file I want to execute only the current line.
Is this possible?<
If I have a command on a line of text within vi/Vim like this"
ls -la
Position the cursor anywhere on the line and do ":.!!" and press return.
That is: colon dot bang bang return
That will execute the text in that line in the current shell from within vi/Vim and have the output inserted within the text file.
I'm thinking that is what you were asking? It's like magic.