Question

Is there a way to kill a python script that is being run by Python-mode? If the script were being run from the shell, you could press Ctrl+C to cause a KeyboardInterrupt, but this does not seem to work. The only way that I have been able to kill it is to kill the vim process entirely.

Was it helpful?

Solution

This is one of the problems recently discussed in vim-dev and in some other topics. This behavior requires patching vim source to have eventloop in a separate thread, but there is no patch for this yet.

Currently there is no way to do this. Some running python scripts may be interrupted by sending a SIGINT, but not all.

OTHER TIPS

You should use :!python % to run the file, after putting in a breakpoint or otherwise.

Then you would be able to kill the python processs with Cntrl+C

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top