简体   繁体   中英

linux vim latex-suite compile oddity

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.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM