I'm using Vim with LaTeX-Suite. Occasionally when I compile a file with errors using <Leader>ll, the error in my source is such that the LaTeX compiler registers an error in a file deep in the bowels of my TeX distribution, say pstricks-add.tex or something, so it automatically opens this irrelevant file in the window.

Since the actual error is in my source, I'd like to surpress this behavior, and only have it open the file when I press Enter after selecting it in the Quickfix window.


The proper, erroneous line in my source is displayed in the .log file window below the Quickfix window

I have the following in my .vimrc:

" compile to pdf                              
let g:Tex_DefaultTargetFormat = 'pdf' 

" pdf compile and view settings                                
let g:Tex_ViewRule_pdf = 'open -a Preview'
let g:Tex_CompileRule_pdf = 'latexmk -pdf'

" ignore all warnings below level 4
let g:TCLevel = 4

" one last thing for latex
let g:tex_flavor = 'latex'

2 Answers 2


let g:Tex_GotoError=0

in your ~/.vimrc should do pretty much what you want.


According to the LaTeX-Suite documentation, pressing

\ll will take you to the location of the first warning/error.

Keeping this feature enabled may or may not be desirable for the situation covered in this post. On the one hand it is may be convenient to be taken to warnings/error. On the other hand, when the screen jumps to a new file, some info is lost. For example, when you return to the original file (using the methods below), it will look exactly as it was before it left, but the undo feature no longer works. I think the history needed by undo has been lost.

If want to keep the feature enabled and it jumps to a different file, then you can quickly return to the original file and location by pressing either




as mentioned in these posts: https://stackoverflow.com/questions/19971023/how-to-go-back-to-previous-opened-file-in-vim and https://stackoverflow.com/questions/133626/how-do-you-return-from-gf-in-vim.

If you want to disable jumping to the first warning/error, then see the answer by @JonathanProtzenko.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .