2015-03-07 17:02:15 -05:00
|
|
|
" vimtex - LaTeX plugin for Vim
|
|
|
|
"
|
|
|
|
" Maintainer: Karl Yngve Lervåg
|
|
|
|
" Email: karl.yngve@gmail.com
|
|
|
|
"
|
|
|
|
|
2015-09-21 12:17:33 -04:00
|
|
|
if exists('current_compiler') | finish | endif
|
|
|
|
let current_compiler = 'latexmk'
|
2015-02-10 05:29:29 -05:00
|
|
|
|
|
|
|
CompilerSet makeprg=""
|
|
|
|
|
|
|
|
"
|
|
|
|
" Note: The errorformat assumes we're using the -file-line-error with
|
|
|
|
" [pdf]latex. For more info, see |errorformat-LaTeX|.
|
|
|
|
"
|
|
|
|
|
|
|
|
" Push file to file stack
|
|
|
|
CompilerSet errorformat=%-P**%f
|
|
|
|
CompilerSet errorformat+=%-P**\"%f\"
|
|
|
|
|
|
|
|
" Match errors
|
|
|
|
CompilerSet errorformat+=%E!\ LaTeX\ %trror:\ %m
|
|
|
|
CompilerSet errorformat+=%E%f:%l:\ %m
|
|
|
|
CompilerSet errorformat+=%E!\ %m
|
|
|
|
|
|
|
|
" More info for undefined control sequences
|
|
|
|
CompilerSet errorformat+=%Z<argument>\ %m
|
|
|
|
|
|
|
|
" More info for some errors
|
|
|
|
CompilerSet errorformat+=%Cl.%l\ %m
|
|
|
|
|
|
|
|
" Show warnings
|
2015-09-21 12:17:33 -04:00
|
|
|
if exists('g:vimtex_quickfix_ignore_all_warnings')
|
|
|
|
\ && exists('g:vimtex_quickfix_ignored_warnings')
|
2015-03-07 17:02:15 -05:00
|
|
|
\ && !g:vimtex_quickfix_ignore_all_warnings
|
2015-02-10 05:29:29 -05:00
|
|
|
" Ignore some warnings
|
2015-03-07 17:02:15 -05:00
|
|
|
for w in g:vimtex_quickfix_ignored_warnings
|
2015-02-10 05:29:29 -05:00
|
|
|
let warning = escape(substitute(w, '[\,]', '%\\\\&', 'g'), ' ')
|
|
|
|
exe 'CompilerSet errorformat+=%-G%.%#'. warning .'%.%#'
|
|
|
|
endfor
|
|
|
|
CompilerSet errorformat+=%+WLaTeX\ %.%#Warning:\ %.%#line\ %l%.%#
|
|
|
|
CompilerSet errorformat+=%+W%.%#\ at\ lines\ %l--%*\\d
|
|
|
|
CompilerSet errorformat+=%+WLaTeX\ %.%#Warning:\ %m
|
2015-09-21 12:18:15 -04:00
|
|
|
CompilerSet errorformat+=%+WPackage\ natbib\ Warning:\ %m\ on\ input\ line\ %l%.
|
2015-02-10 05:29:29 -05:00
|
|
|
CompilerSet errorformat+=%+W%.%#%.%#Warning:\ %m
|
|
|
|
|
|
|
|
" Parse biblatex warnings
|
|
|
|
CompilerSet errorformat+=%-C(biblatex)%.%#in\ t%.%#
|
|
|
|
CompilerSet errorformat+=%-C(biblatex)%.%#Please\ v%.%#
|
|
|
|
CompilerSet errorformat+=%-C(biblatex)%.%#LaTeX\ a%.%#
|
|
|
|
CompilerSet errorformat+=%-Z(biblatex)%m
|
|
|
|
|
2015-11-03 16:07:41 -05:00
|
|
|
" Parse babel warnings
|
|
|
|
CompilerSet errorformat+=%-Z(babel)%.%#input\ line\ %l.
|
|
|
|
CompilerSet errorformat+=%-C(babel)%m
|
|
|
|
|
2015-02-10 05:29:29 -05:00
|
|
|
" Parse hyperref warnings
|
|
|
|
CompilerSet errorformat+=%-C(hyperref)%.%#on\ input\ line\ %l.
|
2016-09-10 16:53:45 -04:00
|
|
|
CompilerSet errorformat+=%-C(hyperref)%m
|
|
|
|
|
|
|
|
" Parse more warnings
|
|
|
|
CompilerSet errorformat+=%-C(scrreprt)%m
|
|
|
|
CompilerSet errorformat+=%-C(fixltx2e)%m
|
|
|
|
CompilerSet errorformat+=%-C(titlesec)%m
|
|
|
|
CompilerSet errorformat+=%-C(Font)%m
|
2015-02-10 05:29:29 -05:00
|
|
|
endif
|
|
|
|
|
|
|
|
" Ignore unmatched lines
|
|
|
|
CompilerSet errorformat+=%-G%.%#
|