blob: 53d5907b9e8ddf56d82d5ac55e7a78e8dc0f920a [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
42command -nargs=+ HiLink hi def link <args>
Bram Moolenaar071d4272004-06-13 20:20:40 +000043
Bram Moolenaar89bcfda2016-08-30 23:26:57 +020044HiLink apComment Comment
45HiLink apOption Keyword
46"HiLink apLastValue Identifier ugly?
47HiLink apTag Special
48HiLink apTagOption Identifier
49HiLink apTagError Error
Bram Moolenaar071d4272004-06-13 20:20:40 +000050
Bram Moolenaar89bcfda2016-08-30 23:26:57 +020051delcommand HiLink
Bram Moolenaar071d4272004-06-13 20:20:40 +000052
53let b:current_syntax = "apachestyle"
54" vim: ts=8