From 7dec59738b81e5b5b9bfa2aaeaf67f7d1490d97c Mon Sep 17 00:00:00 2001 From: LCD 47 Date: Thu, 31 Aug 2017 12:47:11 +0300 Subject: [PATCH] Checker chktex: fix column handling. --- doc/syntastic-checkers.txt | 8 ++++++++ plugin/syntastic.vim | 2 +- syntax_checkers/tex/chktex.vim | 8 ++++---- 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/doc/syntastic-checkers.txt b/doc/syntastic-checkers.txt index 2e62e000..547e782e 100644 --- a/doc/syntastic-checkers.txt +++ b/doc/syntastic-checkers.txt @@ -6379,6 +6379,14 @@ Default: 1 Whether to show informational messages ("chktex" option "-m"). By default informational messages are shown as warnings. +Note~ + +If you're checking files containing tab characters, then Vim's 'tabstop' +must match "ChkTeX"'s idea of tabstop, otherwise column numbers will be +shifted. At the time of this writing, "ChkTeX"'s tabstop is hardcoded to 8, +so you should probably add something like this to your vimrc: > + set tabstop=8 +< ------------------------------------------------------------------------------ 2. lacheck *syntastic-tex-lacheck* diff --git a/plugin/syntastic.vim b/plugin/syntastic.vim index 57662e21..4727c729 100644 --- a/plugin/syntastic.vim +++ b/plugin/syntastic.vim @@ -19,7 +19,7 @@ if has('reltime') lockvar! g:_SYNTASTIC_START endif -let g:_SYNTASTIC_VERSION = '3.8.0-65' +let g:_SYNTASTIC_VERSION = '3.8.0-69' lockvar g:_SYNTASTIC_VERSION " Sanity checks {{{1 diff --git a/syntax_checkers/tex/chktex.vim b/syntax_checkers/tex/chktex.vim index bb3b7454..8a38ed22 100644 --- a/syntax_checkers/tex/chktex.vim +++ b/syntax_checkers/tex/chktex.vim @@ -27,12 +27,12 @@ let s:save_cpo = &cpo set cpo&vim function! SyntaxCheckers_tex_chktex_GetLocList() dict - let makeprg = self.makeprgBuild({ 'args_after': "-q -f \"%k:%n:%f:%l:%c:%m\n\"" }) + let makeprg = self.makeprgBuild({ 'args_after': ['-q', '-f', "%k:%n:%f:%l:%c:%m\n"] }) let errorformat = - \ '%EError:%n:%f:%l:%c:%m,' . - \ '%WWarning:%n:%f:%l:%c:%m,' . - \ (g:syntastic_tex_chktex_showmsgs ? '%WMessage:%n:%f:%l:%c:%m,' : '') . + \ '%EError:%n:%f:%l:%v:%m,' . + \ '%WWarning:%n:%f:%l:%v:%m,' . + \ (g:syntastic_tex_chktex_showmsgs ? '%WMessage:%n:%f:%l:%v:%m,' : '') . \ '%Z%p^,' . \ '%-G%.%#'