1

Whenever I try to compile my LaTeX on vim using vim-latex and \ll I get the following error

vDoc.tex
|| I can't find file `0'. 0
|| Emergency stop. 0 [Quickfix List] :latex -interaction=nonstopmode -file-line-error-style 0 1,1 All

How to fix this? I have the latex version of Mac OS X. Also I have tried to fix by typing in latex -interaction=nonstopmode -file-line-error-style 0 to no avail. Please help.

Thanks.

EDIT: When I type in the command :!latex -interaction=nonstopmode % it compiles but whenever I do \ll it doesn't Furthermore when I use :!latex -interaction=nonstopmode % it doesn't go over the errors when I hit enter...Any help is appreciated.

  • Also I think vim may believe that there is no output on the file, while there clearly is. – user279540 Mar 10 '18 at 18:27
  • Welcome to TeX.SX! Perhaps you want to ask over here: vi.stackexchange.com – Skillmon Mar 17 '18 at 16:26
  • I recently had what I think was the same error after upgrading vim-LaTeX to the latest version on a vim 7.4 installation. Recent updates seem to use v:true and v:false which were only introduced in Vim 8. Didn't find a fix in my case, I just reverted to a slightly older version of vim-LaTeX. – Dai Bowen Jun 7 '18 at 10:51
  • Can you confirm the version of Vim used? I can't replicate exactly the reported error message but do get the ! I can't find file `0'. part and the differences may just be different compilation calls. – Dai Bowen Jun 10 '18 at 16:07
  • I have since fixed this issue, but I do not remember how...I had vim 7.4 but I have since upgraded to vim 8... – user279540 Jun 13 '18 at 16:40
1

This was a problem with running versions of vim-LaTeX from between January 2018 (042f247) and November 2018 (ae0ecab) on vim 7.4 or earlier. As of this last commit vim-LaTeX should work normally on vim 7.4. If constrained to vim 7.4 or earlier the solution should now be upgrade vim-LaTeX.


Using the latest version of vim-LaTeX on vim 7.4 I get

1 || I can't find file `0'. 0
2 || Emergency stop.
3 ||  ==> Fatal error occurred, no output PDF file produced!

which is preceded on my setup by a notice

Error detected while processing function Tex_RunLaTeX..Tex_SetupErrorWindow..Tex_GetMainFileName:
line   23:
E121: Undefined variable: v:true
E116: Invalid arguments for function glob('*.latexmain',v:true) == ''
E15: Invalid expression: glob('*.latexmain',v:true) == ''
line   34:
E121: Undefined variable: v:true
E116: Invalid arguments for function glob('*.latexmain',v:true)
E15: Invalid expression: glob('*.latexmain',v:true)
line   35:
E121: Undefined variable: lheadfile
E15: Invalid expression: lheadfile != ''
line   51:
E121: Undefined variable: lheadfile

The first complaint of this being about v:true, consulting the list of new features in vim 8 we can see that one of those is the addition of the new vim variable v:true.

Since a January 2018 commit (042f247) vim-LaTeX code relies on the existence of the v:true variable. My solution was simply to revert to the vim-LaTeX source just before the aforementioned commit, using the repository as of e6972ac, though of course upgrading to vim 8.0 would be the easier fix.

The commit 042f247 could selectively be omitted from vim-LaTeX, as of the most recent commit (dc2053c) no additional uses of v:true have been made but this could interfere with future updates. It may also be possible to define v:true with vim script but that's beyond me (possibly a question for https://vi.stackexchange.com/).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.