xuhdev / vim-latex-live-preview

A Vim Plugin for Lively Previewing LaTeX PDF Output
https://www.topbug.net/blog/2013/06/13/live-preview-of-latex-in-vim/
GNU General Public License v3.0
834 stars 74 forks source link

Added support to Windows #85

Open 91khr opened 5 years ago

91khr commented 5 years ago

English is not my native language; please excuse typing errors.

It seems that this plugin was incompatible with Windows, as 'env ' has shown:) So I made some small changes to make it compatible.(at least for me)

I don't know if there is still somewhere incompatible with Windows, since I only tested :LLPStartPreview.

stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed after 30 days if no further activity occurs, but feel free to re-open a closed issue if needed. Thanks for contributing to vim-llp!

91khr commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed after 30 days if no further activity occurs, but feel free to re-open a closed issue if needed. Thanks for contributing to vim-llp!

Please don't close this issue: I'm still watching it and waiting for a response...

xuhdev commented 4 years ago

Could you briefly explain how it breaks on Windows?

91khr commented 4 years ago

Firstly, an absolute path on Windows looks like c:\\some\path, where there's a : after driver, but : is not allowed to exist in a folder name, so directly append current path to the temp dir will build an invalid path. Since all absolute path follows the rule above, simply replace : with another char or delete it from the path is a fix.

Secondly, there's no env command on Windows --- the alternative is set. What's more, set only sets the value of an environment variable, so the compile command must be seperated.

English is not my native language, and I have little experience communicating with people; please excuse me or point it out if there's anything wrong with my language.

91khr commented 4 years ago

Thank you for your review! I've just found that on Windows my changes doesn't work for previewing a single file(e.g. :LLPStartPreview %)... From the error message I guess the reason is also that the path to temp dir is not set properly.

I'm sorry that I'm just a senior school student and have little time, so it may take very long for me to test and change it...

I'm not familiar with some English expressions; please excuse this...

badouralix commented 4 years ago

👋 Thanks a lot @91khr for your work on this pr 🙇

I'm not really familiar with the Windows environment, I might need a little bit of time to get a properly working setup and be able to review the pr