annotate runtime/syntax/debcontrol.vim @ 5564:cf722c092360 v7.4.130

updated for version 7.4.130 Problem: Relative line numbers mix up windows when using folds. Solution: Use hasFoldingWin() instead of hasFolding(). (Lech Lorens)
author Bram Moolenaar <bram@vim.org>
date Sat, 14 Dec 2013 12:48:58 +0100
parents 605c9ce57ec3
children 1dea14d4c738
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
2152
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 2034
diff changeset
2 " Language: Debian control files
857
b933657f7c9d updated for version 7.0g01
vimboss
parents: 36
diff changeset
3 " Maintainer: Debian Vim Maintainers <pkg-vim-maintainers@lists.alioth.debian.org>
b933657f7c9d updated for version 7.0g01
vimboss
parents: 36
diff changeset
4 " Former Maintainers: Gerfried Fuchs <alfie@ist.org>
b933657f7c9d updated for version 7.0g01
vimboss
parents: 36
diff changeset
5 " Wichert Akkerman <wakkerma@debian.org>
4502
605c9ce57ec3 Updated runtime files, language files and translations.
Bram Moolenaar <bram@vim.org>
parents: 4229
diff changeset
6 " Last Change: 2013 May 05
2908
fd09a9c8468e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2625
diff changeset
7 " URL: http://anonscm.debian.org/hg/pkg-vim/vim/raw-file/unstable/runtime/syntax/debcontrol.vim
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
8
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
9 " Standard syntax initialization
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
10 if version < 600
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
11 syntax clear
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
12 elseif exists("b:current_syntax")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
13 finish
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
14 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
15
1624
18ee39301b82 updated for version 7.2a
vimboss
parents: 857
diff changeset
16 " Should match case except for the keys of each field
18ee39301b82 updated for version 7.2a
vimboss
parents: 857
diff changeset
17 syn case match
18ee39301b82 updated for version 7.2a
vimboss
parents: 857
diff changeset
18
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
19 " Everything that is not explicitly matched by the rules below
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
20 syn match debcontrolElse "^.*$"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
21
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
22 " Common seperators
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
23 syn match debControlComma ", *"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
24 syn match debControlSpace " "
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
25
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
26 " Define some common expressions we can use later on
3099
887d6d91882e Updated a few runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2908
diff changeset
27 syn match debcontrolArchitecture contained "\%(all\|linux-any\|\%(any-\)\=\%(alpha\|amd64\|arm\%(e[bl]\|hf\)\=\|avr32\|hppa\|i386\|ia64\|lpia\|m32r\|m68k\|mips\%(el\)\=\|powerpc\|ppc64\|s390x\=\|sh[34]\(eb\)\=\|sh\|sparc\%(64\)\=\)\|hurd-\%(i386\|any\)\|kfreebsd-\%(i386\|amd64\|any\)\|knetbsd-\%(i386\|any\)\|kopensolaris-\%(i386\|any\)\|netbsd-\%(alpha\|i386\|any\)\|any\)"
2908
fd09a9c8468e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2625
diff changeset
28 syn match debcontrolMultiArch contained "\%(no\|foreign\|allowed\|same\)"
1624
18ee39301b82 updated for version 7.2a
vimboss
parents: 857
diff changeset
29 syn match debcontrolName contained "[a-z0-9][a-z0-9+.-]\+"
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
30 syn match debcontrolPriority contained "\(extra\|important\|optional\|required\|standard\)"
3513
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3099
diff changeset
31 syn match debcontrolSection contained "\v((contrib|non-free|non-US/main|non-US/contrib|non-US/non-free|restricted|universe|multiverse)/)?(admin|cli-mono|comm|database|debian-installer|debug|devel|doc|editors|education|electronics|embedded|fonts|games|gnome|gnustep|gnu-r|graphics|hamradio|haskell|httpd|interpreters|introspection|java|kde|kernel|libs|libdevel|lisp|localization|mail|math|metapackages|misc|net|news|ocaml|oldlibs|otherosfs|perl|php|python|ruby|science|shells|sound|text|tex|utils|vcs|video|web|x11|xfce|zope)"
1624
18ee39301b82 updated for version 7.2a
vimboss
parents: 857
diff changeset
32 syn match debcontrolPackageType contained "u\?deb"
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
33 syn match debcontrolVariable contained "\${.\{-}}"
1668
0b796e045c42 updated for version 7.2b-000
vimboss
parents: 1624
diff changeset
34 syn match debcontrolDmUpload contained "\cyes"
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
35
1624
18ee39301b82 updated for version 7.2a
vimboss
parents: 857
diff changeset
36 " A URL (using the domain name definitions from RFC 1034 and 1738), right now
18ee39301b82 updated for version 7.2a
vimboss
parents: 857
diff changeset
37 " only enforce protocol and some sanity on the server/path part;
18ee39301b82 updated for version 7.2a
vimboss
parents: 857
diff changeset
38 syn match debcontrolHTTPUrl contained "\vhttps?://[[:alnum:]][-[:alnum:]]*[[:alnum:]]?(\.[[:alnum:]][-[:alnum:]]*[[:alnum:]]?)*\.[[:alpha:]][-[:alnum:]]*[[:alpha:]]?(:\d+)?(/[^[:space:]]*)?$"
18ee39301b82 updated for version 7.2a
vimboss
parents: 857
diff changeset
39 syn match debcontrolVcsSvn contained "\vsvn%(\+ssh)?://[[:alnum:]][-[:alnum:]]*[[:alnum:]]?(\.[[:alnum:]][-[:alnum:]]*[[:alnum:]]?)*\.[[:alpha:]][-[:alnum:]]*[[:alpha:]]?(:\d+)?(/[^[:space:]]*)?$"
18ee39301b82 updated for version 7.2a
vimboss
parents: 857
diff changeset
40 syn match debcontrolVcsCvs contained "\v%(\-d *)?:pserver:[^@]+\@[[:alnum:]][-[:alnum:]]*[[:alnum:]]?(\.[[:alnum:]][-[:alnum:]]*[[:alnum:]]?)*\.[[:alpha:]][-[:alnum:]]*[[:alpha:]]?:/[^[:space:]]*%( [^[:space:]]+)?$"
4502
605c9ce57ec3 Updated runtime files, language files and translations.
Bram Moolenaar <bram@vim.org>
parents: 4229
diff changeset
41 syn match debcontrolVcsGit contained "\v%(git|http)://[[:alnum:]][-[:alnum:]]*[[:alnum:]]?(\.[[:alnum:]][-[:alnum:]]*[[:alnum:]]?)*\.[[:alpha:]][-[:alnum:]]*[[:alpha:]]?(:\d+)?(/[^[:space:]]*)?%(\s+-b\s+[^ ~^:?*[\\]+)?$"
1624
18ee39301b82 updated for version 7.2a
vimboss
parents: 857
diff changeset
42
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
43 " An email address
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
44 syn match debcontrolEmail "[_=[:alnum:]\.+-]\+@[[:alnum:]\./\-]\+"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
45 syn match debcontrolEmail "<.\{-}>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
46
1624
18ee39301b82 updated for version 7.2a
vimboss
parents: 857
diff changeset
47 " #-Comments
3893
c3036f1dca68 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3513
diff changeset
48 syn match debcontrolComment "^#.*$" contains=@Spell
1624
18ee39301b82 updated for version 7.2a
vimboss
parents: 857
diff changeset
49
18ee39301b82 updated for version 7.2a
vimboss
parents: 857
diff changeset
50 syn case ignore
18ee39301b82 updated for version 7.2a
vimboss
parents: 857
diff changeset
51
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
52 " List of all legal keys
4229
fa4089df54bc Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3893
diff changeset
53 syn match debcontrolKey contained "^\%(Source\|Package\|Section\|Priority\|\%(XSBC-Original-\)\=Maintainer\|Uploaders\|Build-\%(Conflicts\|Depends\)\%(-Indep\)\=\|Standards-Version\|\%(Pre-\)\=Depends\|Recommends\|Suggests\|Provides\|Replaces\|Conflicts\|Enhances\|Breaks\|Essential\|Architecture\|Multi-Arch\|Description\|Bugs\|Origin\|X[SB]-Python-Version\|Homepage\|\(XS-\)\=Vcs-\(Browser\|Arch\|Bzr\|Cvs\|Darcs\|Git\|Hg\|Mtn\|Svn\)\|\%(XC-\)\=Package-Type\): *"
fa4089df54bc Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3893
diff changeset
54
fa4089df54bc Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3893
diff changeset
55 syn match debcontrolDeprecatedKey contained "^\%(\%(XS-\)\=DM-Upload-Allowed\): *"
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
56
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
57 " Fields for which we do strict syntax checking
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
58 syn region debcontrolStrictField start="^Architecture" end="$" contains=debcontrolKey,debcontrolArchitecture,debcontrolSpace oneline
2908
fd09a9c8468e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2625
diff changeset
59 syn region debcontrolStrictField start="^Multi-Arch" end="$" contains=debcontrolKey,debcontrolMultiArch oneline
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
60 syn region debcontrolStrictField start="^\(Package\|Source\)" end="$" contains=debcontrolKey,debcontrolName oneline
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
61 syn region debcontrolStrictField start="^Priority" end="$" contains=debcontrolKey,debcontrolPriority oneline
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
62 syn region debcontrolStrictField start="^Section" end="$" contains=debcontrolKey,debcontrolSection oneline
2908
fd09a9c8468e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2625
diff changeset
63 syn region debcontrolStrictField start="^\%(XC-\)\=Package-Type" end="$" contains=debcontrolKey,debcontrolPackageType oneline
1624
18ee39301b82 updated for version 7.2a
vimboss
parents: 857
diff changeset
64 syn region debcontrolStrictField start="^Homepage" end="$" contains=debcontrolKey,debcontrolHTTPUrl oneline keepend
2034
7bc41231fbc7 Update runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1668
diff changeset
65 syn region debcontrolStrictField start="^\%(XS-\)\=Vcs-\%(Browser\|Arch\|Bzr\|Darcs\|Hg\)" end="$" contains=debcontrolKey,debcontrolHTTPUrl oneline keepend
7bc41231fbc7 Update runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1668
diff changeset
66 syn region debcontrolStrictField start="^\%(XS-\)\=Vcs-Svn" end="$" contains=debcontrolKey,debcontrolVcsSvn,debcontrolHTTPUrl oneline keepend
7bc41231fbc7 Update runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1668
diff changeset
67 syn region debcontrolStrictField start="^\%(XS-\)\=Vcs-Cvs" end="$" contains=debcontrolKey,debcontrolVcsCvs oneline keepend
7bc41231fbc7 Update runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1668
diff changeset
68 syn region debcontrolStrictField start="^\%(XS-\)\=Vcs-Git" end="$" contains=debcontrolKey,debcontrolVcsGit oneline keepend
4229
fa4089df54bc Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3893
diff changeset
69 syn region debcontrolStrictField start="^\%(XS-\)\=DM-Upload-Allowed" end="$" contains=debcontrolDeprecatedKey,debcontrolDmUpload oneline
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
70
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
71 " Catch-all for the other legal fields
2034
7bc41231fbc7 Update runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1668
diff changeset
72 syn region debcontrolField start="^\%(\%(XSBC-Original-\)\=Maintainer\|Standards-Version\|Essential\|Bugs\|Origin\|X[SB]-Python-Version\|\%(XS-\)\=Vcs-Mtn\):" end="$" contains=debcontrolKey,debcontrolVariable,debcontrolEmail oneline
2152
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 2034
diff changeset
73 syn region debcontrolMultiField start="^\%(Build-\%(Conflicts\|Depends\)\%(-Indep\)\=\|\%(Pre-\)\=Depends\|Recommends\|Suggests\|Provides\|Replaces\|Conflicts\|Enhances\|Breaks\|Uploaders\|Description\):" skip="^ " end="^$"me=s-1 end="^[^ #]"me=s-1 contains=debcontrolKey,debcontrolEmail,debcontrolVariable,debcontrolComment
3893
c3036f1dca68 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3513
diff changeset
74 syn region debcontrolMultiFieldSpell start="^\%(Description\):" skip="^ " end="^$"me=s-1 end="^[^ #]"me=s-1 contains=debcontrolKey,debcontrolEmail,debcontrolVariable,debcontrolComment,@Spell
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
75
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
76 " Associate our matches and regions with pretty colours
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
77 if version >= 508 || !exists("did_debcontrol_syn_inits")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
78 if version < 508
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
79 let did_debcontrol_syn_inits = 1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
80 command -nargs=+ HiLink hi link <args>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
81 else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
82 command -nargs=+ HiLink hi def link <args>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
83 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
84
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
85 HiLink debcontrolKey Keyword
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
86 HiLink debcontrolField Normal
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
87 HiLink debcontrolStrictField Error
4229
fa4089df54bc Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3893
diff changeset
88 HiLink debcontrolDeprecatedKey Error
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
89 HiLink debcontrolMultiField Normal
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
90 HiLink debcontrolArchitecture Normal
2908
fd09a9c8468e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2625
diff changeset
91 HiLink debcontrolMultiArch Normal
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
92 HiLink debcontrolName Normal
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
93 HiLink debcontrolPriority Normal
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
94 HiLink debcontrolSection Normal
1624
18ee39301b82 updated for version 7.2a
vimboss
parents: 857
diff changeset
95 HiLink debcontrolPackageType Normal
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
96 HiLink debcontrolVariable Identifier
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
97 HiLink debcontrolEmail Identifier
1624
18ee39301b82 updated for version 7.2a
vimboss
parents: 857
diff changeset
98 HiLink debcontrolVcsSvn Identifier
18ee39301b82 updated for version 7.2a
vimboss
parents: 857
diff changeset
99 HiLink debcontrolVcsCvs Identifier
18ee39301b82 updated for version 7.2a
vimboss
parents: 857
diff changeset
100 HiLink debcontrolVcsGit Identifier
18ee39301b82 updated for version 7.2a
vimboss
parents: 857
diff changeset
101 HiLink debcontrolHTTPUrl Identifier
1668
0b796e045c42 updated for version 7.2b-000
vimboss
parents: 1624
diff changeset
102 HiLink debcontrolDmUpload Identifier
1624
18ee39301b82 updated for version 7.2a
vimboss
parents: 857
diff changeset
103 HiLink debcontrolComment Comment
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
104 HiLink debcontrolElse Special
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
105
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
106 delcommand HiLink
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
107 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
108
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
109 let b:current_syntax = "debcontrol"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
110
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
111 " vim: ts=8 sw=2