Previously, the path we were adding to the python path (in order for the local python files to be importable) was the path where vim was launched, not the location of the vim script.
The python code alone doesn't know the location of the vim file (sys.argv[0] is set to some random value), so we need to resolve the path in vimscript and read it from the python code using vim.eval.
Previously, the path we were adding to the python path (in order for the local python files to be importable) was the path where vim was launched, not the location of the vim script.
The python code alone doesn't know the location of the vim file (
sys.argv[0]
is set to some random value), so we need to resolve the path in vimscript and read it from the python code usingvim.eval
.