~gpanders/dotfiles

ref: 2da1dde5ea566f82ebe6532bc6d3b8670fd77ce8 dotfiles/vim/.vim/after/plugin/dispatch.vim -rw-r--r-- 679 bytes
2da1dde5Greg Anders Note 'open' subcommand opens editor in NOTES_DIR when no argument given 1 year, 6 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