typeintandem / tandem

Typing in Tandem. Decentralized, cross-editor, collaborative text-editing!
Apache License 2.0
696 stars 20 forks source link

[Vim] Add path of executing vim script to python path #100

Closed rageandqq closed 6 years ago

rageandqq commented 6 years ago

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.