annotate runtime/syntax/debcontrol.vim @ 216:da182deebec7

updated for version 7.0061
author vimboss
date Fri, 18 Mar 2005 20:25:31 +0000
parents 125e80798a85
children b933657f7c9d
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1 " Vim syntax file
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
2 " Language: Debian control files
36
125e80798a85 updated for version 7.0021
vimboss
parents: 7
diff changeset
3 " Maintainer: Gerfried Fuchs <alfie@debian.org>
125e80798a85 updated for version 7.0021
vimboss
parents: 7
diff changeset
4 " Last Change: 29 Oct 2004
125e80798a85 updated for version 7.0021
vimboss
parents: 7
diff changeset
5 " URL: http://alfie.ist.org/software/vim/syntax/debcontrol.vim
125e80798a85 updated for version 7.0021
vimboss
parents: 7
diff changeset
6 "
125e80798a85 updated for version 7.0021
vimboss
parents: 7
diff changeset
7 " Original Version: Wichert Akkerman <wakkerma@debian.org>
125e80798a85 updated for version 7.0021
vimboss
parents: 7
diff changeset
8
125e80798a85 updated for version 7.0021
vimboss
parents: 7
diff changeset
9 " Comments are very welcome - but please make sure that you are commenting on
125e80798a85 updated for version 7.0021
vimboss
parents: 7
diff changeset
10 " the latest version of this file.
125e80798a85 updated for version 7.0021
vimboss
parents: 7
diff changeset
11 " SPAM is _NOT_ welcome - be ready to be reported!
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
12
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
13 " Standard syntax initialization
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
14 if version < 600
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
15 syntax clear
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
16 elseif exists("b:current_syntax")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
17 finish
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
18 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
19
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
20 " Everything that is not explicitly matched by the rules below
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
21 syn match debcontrolElse "^.*$"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
22
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
23 " Common seperators
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
24 syn match debControlComma ", *"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
25 syn match debControlSpace " "
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
26
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
27 " Define some common expressions we can use later on
36
125e80798a85 updated for version 7.0021
vimboss
parents: 7
diff changeset
28 syn match debcontrolArchitecture contained "\(all\|any\|alpha\|amd64\|arm\|hppa\|i386\|ia64\|m68k\|mipsel\|mips\|powerpc\|s390\|sheb\|sh\|sparc64\|sparc\|hurd-i386\|kfreebsd-i386\|knetbsd-i386\|netbsd-i386\)"
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
29 syn match debcontrolName contained "[a-z][a-z0-9+-]*"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
30 syn match debcontrolPriority contained "\(extra\|important\|optional\|required\|standard\)"
36
125e80798a85 updated for version 7.0021
vimboss
parents: 7
diff changeset
31 syn match debcontrolSection contained "\(\(contrib\|non-free\|non-US/main\|non-US/contrib\|non-US/non-free\)/\)\=\(admin\|base\|comm\|devel\|doc\|editors\|electronics\|embedded\|games\|gnome\|graphics\|hamradio\|interpreters\|kde\|libs\|libdevel\|mail\|math\|misc\|net\|news\|oldlibs\|otherosfs\|perl\|python\|science\|shells\|sound\|text\|tex\|utils\|web\|x11\|debian-installer\)"
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
32 syn match debcontrolVariable contained "\${.\{-}}"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
33
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
34 " An email address
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
35 syn match debcontrolEmail "[_=[:alnum:]\.+-]\+@[[:alnum:]\./\-]\+"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
36 syn match debcontrolEmail "<.\{-}>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
37
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
38 " List of all legal keys
36
125e80798a85 updated for version 7.0021
vimboss
parents: 7
diff changeset
39 syn match debcontrolKey contained "^\(Source\|Package\|Section\|Priority\|Maintainer\|Uploaders\|Build-Depends\|Build-Conflicts\|Build-Depends-Indep\|Build-Conflicts-Indep\|Standards-Version\|Pre-Depends\|Depends\|Recommends\|Suggests\|Provides\|Replaces\|Conflicts\|Essential\|Architecture\|Description\|Bugs\|Origin\|Enhances\): *"
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
40
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
41 " Fields for which we do strict syntax checking
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
42 syn region debcontrolStrictField start="^Architecture" end="$" contains=debcontrolKey,debcontrolArchitecture,debcontrolSpace oneline
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
43 syn region debcontrolStrictField start="^\(Package\|Source\)" end="$" contains=debcontrolKey,debcontrolName oneline
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
44 syn region debcontrolStrictField start="^Priority" end="$" contains=debcontrolKey,debcontrolPriority oneline
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
45 syn region debcontrolStrictField start="^Section" end="$" contains=debcontrolKey,debcontrolSection oneline
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
46
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
47 " Catch-all for the other legal fields
36
125e80798a85 updated for version 7.0021
vimboss
parents: 7
diff changeset
48 syn region debcontrolField start="^\(Maintainer\|Build-Depends\|Build-Conflicts\|Build-Depends-Indep\|Build-Conflicts-Indep\|Standards-Version\|Pre-Depends\|Depends\|Recommends\|Suggests\|Provides\|Replaces\|Conflicts\|Essential\|Bugs\|Origin\|Enhances\):" end="$" contains=debcontrolKey,debcontrolVariable,debcontrolEmail oneline
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
49 syn region debcontrolMultiField start="^\(Uploaders\|Description\):" skip="^ " end="^$"me=s-1 end="^[^ ]"me=s-1 contains=debcontrolKey,debcontrolEmail,debcontrolVariable
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
50
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
51 " Associate our matches and regions with pretty colours
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
52 if version >= 508 || !exists("did_debcontrol_syn_inits")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
53 if version < 508
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
54 let did_debcontrol_syn_inits = 1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
55 command -nargs=+ HiLink hi link <args>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
56 else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
57 command -nargs=+ HiLink hi def link <args>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
58 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
59
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
60 HiLink debcontrolKey Keyword
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
61 HiLink debcontrolField Normal
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
62 HiLink debcontrolStrictField Error
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
63 HiLink debcontrolMultiField Normal
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
64 HiLink debcontrolArchitecture Normal
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
65 HiLink debcontrolName Normal
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
66 HiLink debcontrolPriority Normal
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
67 HiLink debcontrolSection Normal
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
68 HiLink debcontrolVariable Identifier
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
69 HiLink debcontrolEmail Identifier
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
70 HiLink debcontrolElse Special
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
71
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
72 delcommand HiLink
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
73 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
74
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
75 let b:current_syntax = "debcontrol"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
76
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
77 " vim: ts=8 sw=2