I make a file called run_gvim_thing.sh
in my home dir. Inside of that is the command gvim myfile.py && echo "yay"
. If I run that file from terminal it launches gvim with myfile.py. If I run that file from ex mode it does nothing but echos "yay"
Why is this?
When logging gvim for errors I caught this:
Fatal Python error: Py_Initialize: can't initialize sys standard streams
OSError: [Errno 9] Bad file descriptor
:!start gvim
in command line mode.start
is a windows only command. On OSX there'sopen
but it doesn't handle args beyond the second one even with the --args command. It's frankly broken. However yesterday I did come up with a solution by running a python service withzmq
and listening for commands and running them. I can pass it thegvim file.py
command from vim and it'll open it. It's janky but it works.:!gvim file.py &> error.log
and I got this error in the output:Fatal Python error: Py_Initialize: can't initialize sys standard streams OSError: [Errno 9] Bad file descriptor Current thread 0x00007fffd35633c0 (most recent call first) Vim: Caught deadly signal ABRT Vim: Finished.