2

I would like to type :make in Vim to compile my LaTeX document. I wrote down compilation rules in a Makefile, but as soon as I enable the LatexSuite Vim extension, the Makefile is no longer used. Instead, Vim runs latex -interaction=nonstopmode (note the absence of a filename) and hangs in that command. I did not change the g:Tex_UseMakefile option from its default 1 to 0 and according to the documentation, that should cause my Makefile to be used, but it's not.

What configuration is needed to tell LatexSuite to just use my Makefile?

LatexSuite was obtained via OpenSuSE repositories: vim-plugin-latex-20120125-21.1.1.noarch

Helmut Grohne
  • 6,578
  • 2
  • 31
  • 67

1 Answers1

3

You can override this via following setting in your vimrc.

autocmd FileType tex let g:Tex_CompileRule_dvi = 'make'

Alternatively, set makeprg in $HOME/.vim/after/ftplugin/tex.vim

set makeprg='make'

Helpful in-source documentation of file <latex-suite-root-folder>/compiler/tex.vim

Section " Customization of 'makeprg': {{{

This (g:Tex_CompileRule_dvi) is a string which should be directly be able to be cast into " &makeprg.

Hotschke
  • 9,402
  • 6
  • 46
  • 53
  • The proposed solutions work for me. Do you also know why `g:Tex_UseMakefile` is ignored entirely? It seems that there are two files competing to set `makeprg`: `ftplugin/latex-suite/compiler.vim` and `compiler/tex.vim`. Why are there two? – Helmut Grohne Jun 05 '14 at 11:17
  • I am not too familiar with the details. I was looking for an answer of your question by myself since ```g:Tex_UseMakefile``` does not work for some reason. I couldn't figure out what it is. Since the development of latex-suite is more or less stalled (no commits since 1 1/2 year according to sf.net), I fear that this will not get fixed. – Hotschke Jun 05 '14 at 14:05