~gpanders/dotfiles

78871d74b7f0a32ffd610783c8701bf2884121b2 — Greg Anders 2 years ago 6547767
[vim] Add chktex compiler
M vim/.vim/after/ftplugin/tex.vim => vim/.vim/after/ftplugin/tex.vim +7 -1
@@ 1,4 1,10 @@
" LaTeX
if &filetype !=# 'tex'
  finish
endif

setlocal nocursorline
setlocal norelativenumber
:NoMatchParen
" :NoMatchParen

setlocal equalprg=latexindent

M vim/.vim/after/plugin/dispatch.vim => vim/.vim/after/plugin/dispatch.vim +4 -1
@@ 8,7 8,10 @@ augroup Dispatch
  " C/C++
  autocmd FileType c,cpp let b:dispatch = 'cppcheck %:S'

  " " Python
  " Python
  autocmd FileType python let b:start = 'ipython'
                      \ | let b:dispatch = 'pylint -f parseable -s no -- %:S'

  " TeX
  autocmd FileType tex let b:dispatch = 'chktex -q -v0 -- %:S'
augroup END

M vim/.vim/after/plugin/vimtex.vim => vim/.vim/after/plugin/vimtex.vim +2 -5
@@ 2,8 2,8 @@ if !exists('g:loaded_vimtex')
  finish
endif

let g:vimtex_compiler_progname = 'nvr'
let g:vimtex_matchparen_enabled = 0
let g:tex_flavor = 'latex'
let g:matchup_matchparen_deferred = 1

if executable('skim')
  let g:vimtex_view_method = 'skim'


@@ 13,9 13,6 @@ let g:vimtex_fold_enabled = 1

set fillchars=vert:\|,fold:\\

let g:vimtex_labels_refresh_always = 0
let g:vimtex_toc_refresh_always = 0

augroup vimtex
  autocmd!
  autocmd BufWritePost *.tex call vimtex#labels#refresh()

A vim/.vim/compiler/chktex.vim => vim/.vim/compiler/chktex.vim +13 -0
@@ 0,0 1,13 @@
" chktex compiler for Vim
" Compiler: chktex
" Maintainer: Greg Anders <greg@gpanders.com>
" Last Change: 1/1/2019

let current_compiler = 'chktex'

if exists(":CompilerSet") != 2		" older Vim always used :setlocal
  command -nargs=* CompilerSet setlocal <args>
endif

CompilerSet makeprg=chktex\ -q\ -v0\ --\ %:S
CompilerSet errorformat=%f:%l:%c:%n:%m