blob: 3695a11421e5b67e9e868ef58b4075b8b877027e [file] [log] [blame]
Bram Moolenaar071d4272004-06-13 20:20:40 +00001" 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
Bram Moolenaar89bcfda2016-08-30 23:26:57 +020023" quit when a syntax file was already loaded
24if exists("b:current_syntax")
Bram Moolenaar071d4272004-06-13 20:20:40 +000025 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.
Bram Moolenaar89bcfda2016-08-30 23:26:57 +020041" Only when an item doesn't have highlighting yet
Bram Moolenaar071d4272004-06-13 20:20:40 +000042
Bram Moolenaarf37506f2016-08-31 22:22:10 +020043hi 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
Bram Moolenaar071d4272004-06-13 20:20:40 +000049
Bram Moolenaar071d4272004-06-13 20:20:40 +000050
51let b:current_syntax = "apachestyle"
52" vim: ts=8