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

Make use of TEXINPUTS from environment: Fixes #106 #107

Closed mjsossong closed 4 years ago

mjsossong commented 4 years ago

Summary

I added g:Tex_TEXINPUTS to the TEXINPUTS in the run_cmd for the compiler and the bibtex compiler.

This initially failed with: E121: Undefined variable: g:Tex_TEXINPUTS, but that was resolved by adding let g:Tex_TEXINPUTS=$TEXINPUTS to my .vimrc

To resolve this, I added defaulting of g:Tex_TEXINPUTS to '' if it was not defined.

Other Information

This appears to be working properly now, both with and without g:Tex_TEXINPUTS being set. If the user wants to make use of this functionality, they will have to add let g:Tex_TEXINPUTS=$TEXINPUTS to their .vimrc.

mjsossong commented 4 years ago

Thanks for the feedback.  I've made all the suggested changes, and changed it to default to $TEXINPUTS so nothing needs to be set in .vimrc.  I also added documentation to README.md. Let me know what you think.