shell - Break the current program without exiting VIM -
when using vim, run programs using bang in command mode. is, use
:!<external shell command>
to test code without exiting vim or alt-tabbing open shell. example, when writing java code, might like
:!java main
or in c, maybe
:!cls & gcc -g -o main program.c file.c & main
this works fine. vim window turns shell, program runs, , upon exit vim.
the issue when program hits infinite loop. stuck terminal displaying standard output , can't vim. control-c exits , need re-open vim , re-open files , it's big mess (especially if didn't save something!).
tl;dr there way stop internally-running externally-defined shell commands in vim?
in case, ctrl-c
works fine.
i on vim 7.4
on ubuntu 14.04.
Comments
Post a Comment