2 " Language: Apache-Style configuration files (proftpd.conf/apache.conf/..)
3 " Maintainer: Christian Hammers <ch@westend.com>
7 " adopted Vim 6.0 syntax style
11 " The following formats are recognised:
15 " Option value1 value2
16 " Option = value1 value2 #not apache but also allowed
23 " For version 5.x: Clear all syntax items
24 " For version 6.x: Quit when a syntax file was already loaded
27 elseif exists("b:current_syntax")
33 syn match apComment /^\s*#.*$/
34 syn match apOption /^\s*[^ \t#<=]*/
35 "syn match apLastValue /[^ \t<=#]*$/ contains=apComment ugly
38 syn region apTag start=/</ end=/>/ contains=apTagOption,apTagError
39 " the following should originally be " [^<>]+" but this didn't work :(
40 syn match apTagOption contained / [-\/_\.:*a-zA-Z0-9]\+/ms=s+1
41 syn match apTagError contained /[^>]</ms=s+1
43 " Define the default highlighting.
44 " For version 5.7 and earlier: only when not done already
45 " For version 5.8 and later: only when an item doesn't have highlighting yet
46 if version >= 508 || !exists("did_apachestyle_syn_inits")
48 let did_apachestyle_syn_inits = 1
49 command -nargs=+ HiLink hi link <args>
51 command -nargs=+ HiLink hi def link <args>
54 HiLink apComment Comment
55 HiLink apOption Keyword
56 "HiLink apLastValue Identifier ugly?
58 HiLink apTagOption Identifier
59 HiLink apTagError Error
64 let b:current_syntax = "apachestyle"