1" Vim syntax file
2" Language:	Apache-Style configuration files (proftpd.conf/apache.conf/..)
3" Maintainer:	Christian Hammers <[email protected]>
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" quit when a syntax file was already loaded
24if exists("b:current_syntax")
25  finish
26endif
27
28syn case ignore
29
30syn match  apComment	/^\s*#.*$/
31syn match  apOption	/^\s*[^ \t#<=]*/
32"syn match  apLastValue	/[^ \t<=#]*$/ contains=apComment	ugly
33
34" tags
35syn region apTag	start=/</ end=/>/ contains=apTagOption,apTagError
36" the following should originally be " [^<>]+" but this didn't work :(
37syn match  apTagOption	contained / [-\/_\.:*a-zA-Z0-9]\+/ms=s+1
38syn match  apTagError	contained /[^>]</ms=s+1
39
40" Define the default highlighting.
41" Only when an item doesn't have highlighting yet
42
43hi def link apComment	Comment
44hi def link apOption	Keyword
45"hi def link apLastValue	Identifier		ugly?
46hi def link apTag		Special
47hi def link apTagOption	Identifier
48hi def link apTagError	Error
49
50
51let b:current_syntax = "apachestyle"
52" vim: ts=8
53