Mercurial > vim
comparison runtime/syntax/apachestyle.vim @ 7:3fc0f57ecb91 v7.0001
updated for version 7.0001
author | vimboss |
---|---|
date | Sun, 13 Jun 2004 20:20:40 +0000 |
parents | |
children | 43efa4f5a8ea |
comparison
equal
deleted
inserted
replaced
6:c2daee826b8f | 7:3fc0f57ecb91 |
---|---|
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 | |
25 if version < 600 | |
26 syntax clear | |
27 elseif exists("b:current_syntax") | |
28 finish | |
29 endif | |
30 | |
31 syn case ignore | |
32 | |
33 syn match apComment /^\s*#.*$/ | |
34 syn match apOption /^\s*[^ \t#<=]*/ | |
35 "syn match apLastValue /[^ \t<=#]*$/ contains=apComment ugly | |
36 | |
37 " tags | |
38 syn region apTag start=/</ end=/>/ contains=apTagOption,apTagError | |
39 " the following should originally be " [^<>]+" but this didn't work :( | |
40 syn match apTagOption contained / [-\/_\.:*a-zA-Z0-9]\+/ms=s+1 | |
41 syn 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 | |
46 if 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 | |
62 endif | |
63 | |
64 let b:current_syntax = "apachestyle" | |
65 " vim: ts=8 |