The attached patches to compiler/tex.vim configure the Vim-LaTeX suite to parse error messages when
latex -file-line-error is used. This option tells LaTeX to produce more C-like error messages so that Vim doesn't have to do parentheses acrobatics to figure out the corresponding file. However, warnings are still in LaTeX's lisp-y format, and so a good latex wrapper is still warranted if you care about warnings. The second patch updates the tex.vim modeline to match the conventional Vim-LaTeX source modeline. # HG changeset patch # User tpavlic # Date 1231793010 18000 # Node ID 57d4972f5443bcf5b791ff02ef493fd64fd4867d # Parent 1482232d621c1fab4ca88b2c447e3c30f5b32c0c Added errorformat (efm) support for latex -file-line-error (which sanitizes error messages for Vim) diff --git a/vimfiles/compiler/tex.vim b/vimfiles/compiler/tex.vim --- a/vimfiles/compiler/tex.vim +++ b/vimfiles/compiler/tex.vim @@ -202,6 +202,7 @@ setlocal efm+=%E!\ LaTeX\ %trror:\ %m setlocal efm+=%E!\ %m + setlocal efm+=%E%f:%l:\ %m setlocal efm+=%+WLaTeX\ %.%#Warning:\ %.%#line\ %l%.%# setlocal efm+=%+W%.%#\ at\ lines\ %l--%*\\d diff --git a/vimfiles/ftplugin/latex-suite/texrc b/vimfiles/ftplugin/latex-suite/texrc --- a/vimfiles/ftplugin/latex-suite/texrc +++ b/vimfiles/ftplugin/latex-suite/texrc @@ -104,7 +104,8 @@ " values, but if use some other compiler, then you will want to change this. " As CompileFlags value you'd perhaps like to use, e.g., '-src-specials', " but it is known that it can sometimes give different results in the output, -" so use it with care. +" so use it with care. The '-file-line-error' flag helps sanitize LaTeX error +" messages for processing by Vim. TexLet g:Tex_CompileRule_dvi = 'latex -interaction=nonstopmode $*' TexLet g:Tex_EscapeChars = '{}\' # HG changeset patch # User tpavlic # Date 1231793243 18000 # Node ID 2c02840c23f8ca3a29e08eea90b33df6ca1ff5ad # Parent 57d4972f5443bcf5b791ff02ef493fd64fd4867d Update modeline in compiler/tex.vim to match others. diff --git a/vimfiles/compiler/tex.vim b/vimfiles/compiler/tex.vim --- a/vimfiles/compiler/tex.vim +++ b/vimfiles/compiler/tex.vim @@ -291,4 +291,4 @@ call Tex_Debug("compiler/tex.vim: sourcing this file", "comp") -" vim: fdm=marker:commentstring=\ \"\ %s +" vim:fdm=marker:ff=unix:noet:ts=4:sw=4 -- Ted Pavlic <t...@tedpavlic.com> Please visit my ALS association page: http://web.alsa.org/goto/tedpavlic My family appreciates your support in the fight to defeat ALS. ------------------------------------------------------------------------------ This SF.net email is sponsored by: SourcForge Community SourceForge wants to tell your story. http://p.sf.net/sfu/sf-spreadtheword _______________________________________________ Vim-latex-devel mailing list Vim-latex-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/vim-latex-devel