Skip to content

Commit

Permalink
Checker chktex: fix column handling.
Browse files Browse the repository at this point in the history
  • Loading branch information
lcd047 committed Aug 31, 2017
1 parent 742e8b0 commit 7dec597
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 5 deletions.
8 changes: 8 additions & 0 deletions doc/syntastic-checkers.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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*

Expand Down
2 changes: 1 addition & 1 deletion plugin/syntastic.vim
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions syntax_checkers/tex/chktex.vim
Original file line number Diff line number Diff line change
Expand Up @@ -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%.%#'

Expand Down

0 comments on commit 7dec597

Please sign in to comment.