]> git.r.bdr.sh - rbdr/dotfiles/blob - vim/syntax_checkers/gentoo_metadata.vim
Merge branch 'master' of github.com:benbeltran/dotfiles
[rbdr/dotfiles] / vim / syntax_checkers / gentoo_metadata.vim
1 "============================================================================
2 "File: gentoo-metadata.vim
3 "Description: Syntax checking plugin for Gentoo's metadata.xml 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 " The DTDs required to validate metadata.xml files are available in
14 " $PORTDIR/metadata/dtd, and these local files can be used to significantly
15 " speed up validation. You can create a catalog file with:
16 "
17 " xmlcatalog --create --add rewriteURI http://www.gentoo.org/dtd/ \
18 " ${PORTDIR:-/usr/portage}/metadata/dtd/ /etc/xml/gentoo
19 "
20 " See xmlcatalog(1) and http://www.xmlsoft.org/catalog.html for more
21 " information.
22
23 if exists("loaded_gentoo_metadata_syntax_checker")
24 finish
25 endif
26 let loaded_gentoo_metadata_syntax_checker = 1
27
28 "bail if the user doesn't have xmllint installed
29 if !executable("xmllint")
30 finish
31 endif
32
33 runtime syntax_checkers/xml.vim
34
35 function! SyntaxCheckers_gentoo_metadata_GetLocList()
36 return SyntaxCheckers_xml_GetLocList()
37 endfunction