Skip to content Skip to sidebar Skip to footer

[1]+ Stopped Vim Foo.py Error, How To Fix This?

whenever I run a python program from vim command like this: :!python foo.py after running the program, vim will stop and say this: [1]+ Stopped vim foo.py I don'

Solution 1:

Saying:

set shellcmdflag=-ic

causes vim to open an interactive shell upon trying to execute a shell command.

In order to open an interactive shell, it suspends the vim process. That explains the behaviour (both [1]+ Stopped ... and Found a swap file ...) you're observing.

(You can say fg to resume the editor from the shell thus created.)

If you remove

set shellcmdflag=-ic

from your .exerc, you wouldn't observe this issue.

Solution 2:

In order to execute your python script, Vim must be suspended so that the script can be run in your shell.

What you see is not an error, it's your shell helpfully telling you that Vim is suspended (or "backgrounded" or "in the background" or… "stopped"). and that it's apparently the first and only program to be suspended.

To get back to Vim, just type fg (for foreground) at the prompt.

So, basically, what you get is both normal and expected.

Post a Comment for "[1]+ Stopped Vim Foo.py Error, How To Fix This?"