Mercurial > vim
annotate runtime/syntax/apachestyle.vim @ 24221:70ef6b343eee
Added tag v8.2.2651 for changeset a7a9176bb542f95c80c9bdd25206a2a9a4598ba7
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Thu, 25 Mar 2021 21:15:05 +0100 |
parents | a6d3e2081544 |
children |
rev | line source |
---|---|
7 | 1 " Vim syntax file |
2 " Language: Apache-Style configuration files (proftpd.conf/apache.conf/..) | |
13051 | 3 " Maintainer: Ben RUBSON <ben.rubson@gmail.com> |
4 " Former Maintainer: Christian Hammers <ch@westend.com> | |
7 | 5 " ChangeLog: |
13051 | 6 " 2017-12-17,ch |
7 " correctly detect comments | |
7 | 8 " 2001-05-04,ch |
9 " adopted Vim 6.0 syntax style | |
10 " 1999-10-28,ch | |
11 " initial release | |
12 | |
13 " The following formats are recognised: | |
14 " Apache-style .conf | |
15 " # Comment | |
16 " Option value | |
17 " Option value1 value2 | |
18 " Option = value1 value2 #not apache but also allowed | |
19 " <Section Name?> | |
20 " Option value | |
21 " <SubSection Name?> | |
22 " </SubSection> | |
23 " </Section> | |
24 | |
10048
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
7
diff
changeset
|
25 " quit when a syntax file was already loaded |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
7
diff
changeset
|
26 if exists("b:current_syntax") |
7 | 27 finish |
28 endif | |
29 | |
30 syn case ignore | |
31 | |
13051 | 32 syn match apOption /^\s*[^ \t#<=]*/ |
7 | 33 syn match apComment /^\s*#.*$/ |
34 "syn match apLastValue /[^ \t<=#]*$/ contains=apComment ugly | |
35 | |
36 " tags | |
37 syn region apTag start=/</ end=/>/ contains=apTagOption,apTagError | |
38 " the following should originally be " [^<>]+" but this didn't work :( | |
39 syn match apTagOption contained / [-\/_\.:*a-zA-Z0-9]\+/ms=s+1 | |
40 syn match apTagError contained /[^>]</ms=s+1 | |
41 | |
42 " Define the default highlighting. | |
10048
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
7
diff
changeset
|
43 " Only when an item doesn't have highlighting yet |
7 | 44 |
10051
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
45 hi def link apComment Comment |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
46 hi def link apOption Keyword |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
47 "hi def link apLastValue Identifier ugly? |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
48 hi def link apTag Special |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
49 hi def link apTagOption Identifier |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
50 hi def link apTagError Error |
7 | 51 |
52 | |
53 let b:current_syntax = "apachestyle" | |
54 " vim: ts=8 |