23
7
Consider any interpreted programming language.
I can run the currently opened script using ! interpreter %
, and use the return key to return to vim after the execution is finished.
Is it somehow possible to not replace the current window with the output of the executed shell command, but open the output in a new split pane instead? I would like to still see my source code during the execution of my script.
I tried :split ! interpreter %
, but it didn't work.
Is there a way? I am using vim 7.3.
The above ":execute ..." command works for me, but when I try to bind it to F9 keystroke, using this .vimrc entry [ nnoremap <buffer> <F9> :execute 'new | 0read !/usr/bin/env python3' expand('%') ], I get the following error: [ /bin/bash: -c: line 0: unexpected EOF while looking for matching `'' expand('%') ]. I tried several escape sequences, but I guess not the right one. =:). Any ideas? Thank you. – NYCeyes – 2016-08-20T23:30:49.927