donRaphaco / neotex

latex live preview - plugin for neovim and vim 8
MIT License
177 stars 8 forks source link

Paths with special characters or spaces don't work #1

Closed cless closed 7 years ago

cless commented 7 years ago

If the pathname of your .tex file has a space the plugin fails to change the directory and then never gets to compiling the latex code. I've created a patch cless/neotex@2c3f26f3bb6b3dcc057504b430757fa3cccf1737 and while that works it's probably not an ideal way to go about solving this issue.

I'm guessing vim passes the b:neotex_jobexe to the current shell, and I guess that means that how you escape your string depends heavily on your environment. Can the job be executed from python instead, using the subprocess api, or is there a special reason that it needs to be done from vimscript?

donRaphaco commented 7 years ago

First of all thaks for the patch. And you're right it would be a better solution if the job is executed from python using subprocess. In fact I wanted to use pythons subprocess api in the first place, but somehow it didn't work. (I thought maybe it doesn't work with neovim remote plugins.) Right now I don't have much time, but in a few weeks (when my exams are over) I will try to find a solution for this issue.

donRaphaco commented 7 years ago

this should fix it