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?<
Add this mapping to your .vimrc file,
nmap E yyp:.!csh
Explanation:
yy
Yank current linep
Paste yanked line below (and the cursor goes to this next row):.!csh
Execute (using csh
) this newly pasted line in place. The output of this line replaces this current line, thus before executing the line was yanked and pasted below.