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
835 stars 74 forks source link

Error detected while processing function <SNR>13_StartPreview: #112

Open i8890321 opened 3 years ago

i8890321 commented 3 years ago

Expected behavior

a PDF preview with SumatraPDF should pops out

Actual behavior

I encounter the following error

Error detected while processing function 13_StartPreview: line 66: E739: Cannot create directory: C:\Users\USERNAME\AppData\Local\Temp\vim-latex-live-preview-cersh_wsC:\Users

E739: Cannot create directory: C:\Users\USERNAME\AppData\Local\Temp\vim-latex-live-preview-cersh_wsC:\Users\USERNAME

line 95: "~\AppData\Local\Temp\vim-latex-live-preview-cersh_wsC:\Users\USERNAME\test2" E212: Can't open file for writing

Failed to compile

Steps to reproduce

:LLPStartPreview Tell us how it occurs

  1. Type :LLPStartPreview
  2. Error occures
  3. I think there are some problems on the path

System configuration

Window 10 with vim compiled with python/dyn, python3/dyn (Echo has('python') and Echo has('python3') give "1"

badouralix commented 3 years ago

Hi @i8890321 ! Thanks a lot for your feedback. My understand of the problem is that file paths in windows contain :, and since we use these paths to craft temporary files for the plugin. Typically we write the content of the current buffer there before compiling it.

Any chance you can paste the output of this command ?

:echo b:livepreview_buf_data['tmp_src_file']

This reminds me of https://github.com/xuhdev/vim-latex-live-preview/pull/85, which replaces this extra : into a _ If you can confirm this patch works, we can work on merging it