5

Running linux, when I compile a latex document from within vim with the latex-suite installed, I am (needlessly) prompted to hit ENTER. That is, when I type \ll to compile, the screen appears to drop out of vim to the command prompt which reads:

Press ENTER or type command to continue

Hitting ENTER returns me to vim with my document successfully compiled, however I'd prefer not to have to hit ENTER here (I don't have this same problem running from a Mac).

My .tex file reads as follows

\documentclass{article}
\title{This is the title}
\author{The Author}
\date{September 2013}
\begin{document}
\maketitle
Hello World!
\end{document}

From within vim, I give the following command:

:echo g:Tex_DefaultTargetFormat

and receive

pdf

I give the following command:

:echo g:Tex_CompileRule_pdf

and receive

pdflatex -interaction=nonstopmode $* >/dev/null 2>/dev/null

From the bash prompt I can type

pdflatex -interaction=nonstopmode HelloWorld.tex >/dev/null 2>/dev/null

and pdflatex compiles my document without requesting that I hit ENTER. Any help to not have to hit ENTER at the command prompt would be appreciated.

Ingo Karkat
  • 167,457
  • 16
  • 250
  • 324
joelwatsonfish
  • 103
  • 1
  • 1
  • 5

1 Answers1

0

You can remap the \ll or create a new mapping, for example \ls for silent compiling:

map <leader>ls :silent call Tex_RunLaTeX()<cr>

The key here is the silent command, which prevents vim from asking you to hit Enter. However, you won't see any output from this.

J0hn D0e
  • 167
  • 1
  • 3
  • 10