]> git.r.bdr.sh - rbdr/dotfiles/blame - vim/syntax_checkers/rst.vim
Update the stuff
[rbdr/dotfiles] / vim / syntax_checkers / rst.vim
CommitLineData
0d23b6e5
BB
1"============================================================================
2"File: rst.vim
3"Description: Syntax checking plugin for docutil's reStructuredText files
4"Maintainer: James Rowe <jnrowe at gmail dot com>
5"License: This program is free software. It comes without any warranty,
6" to the extent permitted by applicable law. You can redistribute
7" it and/or modify it under the terms of the Do What The Fuck You
8" Want To Public License, Version 2, as published by Sam Hocevar.
9" See http://sam.zoy.org/wtfpl/COPYING for more details.
10"
11"============================================================================
12
13" We use rst2pseudoxml.py, as it is ever so marginally faster than the other
14" rst2${x} tools in docutils.
15
16if exists("loaded_rst_syntax_checker")
17 finish
18endif
19let loaded_rst_syntax_checker = 1
20
21"bail if the user doesn't have rst2pseudoxml.py installed
22if !executable("rst2pseudoxml.py")
23 finish
24endif
25
26function! SyntaxCheckers_rst_GetLocList()
27 let makeprg = 'rst2pseudoxml.py --report=1 --exit-status=1 ' .
28 \ shellescape(expand('%')) . ' /dev/null'
29
30 let errorformat = '%f:%l:\ (%tNFO/1)\ %m,
31 \%f:%l:\ (%tARNING/2)\ %m,
32 \%f:%l:\ (%tRROR/3)\ %m,
33 \%f:%l:\ (%tEVERE/4)\ %m,
34 \%-G%.%#'
35
36 return SyntasticMake({ 'makeprg': makeprg, 'errorformat': errorformat })
37endfunction