~gpanders/dotfiles

ref: c8e63bac959db19c138dcc3198a56514f0b444ff dotfiles/.vim/after/plugin/dispatch.vim -rw-r--r-- 679 bytes
c8e63bacGreg Anders Manage dotfiles directly in home directory 1 year, 4 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
" vim-dispatch configuration
" Author: Greg Anders <greg@gpanders.com>
" Date: 2018-12-03

if !get(g:, 'loaded_dispatch')
  finish
endif

if !exists('g:dispatch_compilers')
  let g:dispatch_compilers = {}
endif

" The pytest compiler uses `py.test' as its command, so Dispatch won't find it
" when the command is `pytest' (without the dot) unless we add this
let g:dispatch_compilers['pytest'] = 'pytest'

augroup plugin.dispatch
  autocmd!

  " Python
  autocmd FileType python let b:dispatch = 'pytest --tb=short -q'

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

  " Bash
  autocmd FileType sh let b:dispatch = 'shellcheck -f gcc -- %:S'
augroup END