1" Vim syntax file 2" Language: Apache-Style configuration files (proftpd.conf/apache.conf/..) 3" Maintainer: Christian Hammers <ch@westend.com> 4" URL: none 5" ChangeLog: 6" 2001-05-04,ch 7" adopted Vim 6.0 syntax style 8" 1999-10-28,ch 9" initial release 10 11" The following formats are recognised: 12" Apache-style .conf 13" # Comment 14" Option value 15" Option value1 value2 16" Option = value1 value2 #not apache but also allowed 17" <Section Name?> 18" Option value 19" <SubSection Name?> 20" </SubSection> 21" </Section> 22 23" For version 5.x: Clear all syntax items 24" For version 6.x: Quit when a syntax file was already loaded 25if version < 600 26 syntax clear 27elseif exists("b:current_syntax") 28 finish 29endif 30 31syn case ignore 32 33syn match apComment /^\s*#.*$/ 34syn match apOption /^\s*[^ \t#<=]*/ 35"syn match apLastValue /[^ \t<=#]*$/ contains=apComment ugly 36 37" tags 38syn region apTag start=/</ end=/>/ contains=apTagOption,apTagError 39" the following should originally be " [^<>]+" but this didn't work :( 40syn match apTagOption contained / [-\/_\.:*a-zA-Z0-9]\+/ms=s+1 41syn match apTagError contained /[^>]</ms=s+1 42 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 46if version >= 508 || !exists("did_apachestyle_syn_inits") 47 if version < 508 48 let did_apachestyle_syn_inits = 1 49 command -nargs=+ HiLink hi link <args> 50 else 51 command -nargs=+ HiLink hi def link <args> 52 endif 53 54 HiLink apComment Comment 55 HiLink apOption Keyword 56 "HiLink apLastValue Identifier ugly? 57 HiLink apTag Special 58 HiLink apTagOption Identifier 59 HiLink apTagError Error 60 61 delcommand HiLink 62endif 63 64let b:current_syntax = "apachestyle" 65" vim: ts=8 66