comparison runtime/syntax/debcontrol.vim @ 2152:b9e314fe473f

Updated runtime files.
author Bram Moolenaar <bram@zimbu.org>
date Fri, 14 May 2010 23:24:24 +0200
parents 7bc41231fbc7
children 0aa21d63aba0
comparison
equal deleted inserted replaced
2151:ae22c450546c 2152:b9e314fe473f
1 " Vim syntax file 1 " Vim syntax file
2 " Language: Debian control files 2 " Language: Debian control files
3 " Maintainer: Debian Vim Maintainers <pkg-vim-maintainers@lists.alioth.debian.org> 3 " Maintainer: Debian Vim Maintainers <pkg-vim-maintainers@lists.alioth.debian.org>
4 " Former Maintainers: Gerfried Fuchs <alfie@ist.org> 4 " Former Maintainers: Gerfried Fuchs <alfie@ist.org>
5 " Wichert Akkerman <wakkerma@debian.org> 5 " Wichert Akkerman <wakkerma@debian.org>
6 " Last Change: 2009 July 14 6 " Last Change: 2009 Aug 17
7 " URL: http://git.debian.org/?p=pkg-vim/vim.git;a=blob_plain;f=runtime/ftplugin/debcontrol.vim;hb=debian 7 " URL: http://hg.debian.org/hg/pkg-vim/vim/raw-file/tip/runtime/syntax/debcontrol.vim
8
9 " Comments are very welcome - but please make sure that you are commenting on
10 " the latest version of this file.
11 " SPAM is _NOT_ welcome - be ready to be reported!
12 8
13 " Standard syntax initialization 9 " Standard syntax initialization
14 if version < 600 10 if version < 600
15 syntax clear 11 syntax clear
16 elseif exists("b:current_syntax") 12 elseif exists("b:current_syntax")
26 " Common seperators 22 " Common seperators
27 syn match debControlComma ", *" 23 syn match debControlComma ", *"
28 syn match debControlSpace " " 24 syn match debControlSpace " "
29 25
30 " Define some common expressions we can use later on 26 " Define some common expressions we can use later on
31 syn match debcontrolArchitecture contained "\(all\|any\|alpha\|amd64\|arm\(e[bl]\)\=\|avr32\|hppa\|i386\|ia64\|m32r\|m68k\|mipsel\|mips\|powerpc\|ppc64\|s390x\=\|sh[34]\(eb\)\=\|sh\|sparc64\|sparc\|hurd-i386\|kfreebsd-\(i386\|amd64\|gnu\)\|knetbsd-i386\|netbsd-\(alpha\|i386\)\)" 27 syn match debcontrolArchitecture contained "\%(all\|any\|alpha\|amd64\|arm\%(e[bl]\)\=\|avr32\|hppa\|i386\|ia64\|lpia\|m32r\|m68k\|mips\%(el\)\=\|powerpc\|ppc64\|s390x\=\|sh[34]\(eb\)\=\|sh\|sparc\%(64\)\=\|hurd-i386\|kfreebsd-\%(i386\|amd64\|gnu\)\|knetbsd-i386\|kopensolaris-i386\|netbsd-\%(alpha\|i386\)\)"
32 syn match debcontrolName contained "[a-z0-9][a-z0-9+.-]\+" 28 syn match debcontrolName contained "[a-z0-9][a-z0-9+.-]\+"
33 syn match debcontrolPriority contained "\(extra\|important\|optional\|required\|standard\)" 29 syn match debcontrolPriority contained "\(extra\|important\|optional\|required\|standard\)"
34 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|electronics|embedded|fonts|games|gnome|gnustep|gnu-r|graphics|hamradio|haskell|httpd|interpreters|java|kde|kernel|libs|libdevel|lisp|localization|mail|math|misc|net|news|ocaml|oldlibs|otherosfs|perl|php|python|ruby|science|shells|sound|text|tex|utils|vcs|video|web|x11|xfce|zope)" 30 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|electronics|embedded|fonts|games|gnome|gnustep|gnu-r|graphics|hamradio|haskell|httpd|interpreters|java|kde|kernel|libs|libdevel|lisp|localization|mail|math|misc|net|news|ocaml|oldlibs|otherosfs|perl|php|python|ruby|science|shells|sound|text|tex|utils|vcs|video|web|x11|xfce|zope)"
35 syn match debcontrolPackageType contained "u\?deb" 31 syn match debcontrolPackageType contained "u\?deb"
36 syn match debcontrolVariable contained "\${.\{-}}" 32 syn match debcontrolVariable contained "\${.\{-}}"
51 syn match debcontrolComment "^#.*$" 47 syn match debcontrolComment "^#.*$"
52 48
53 syn case ignore 49 syn case ignore
54 50
55 " List of all legal keys 51 " List of all legal keys
56 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\|Essential\|Architecture\|Description\|Bugs\|Origin\|X[SB]-Python-Version\|Homepage\|\(XS-\)\=Vcs-\(Browser\|Arch\|Bzr\|Cvs\|Darcs\|Git\|Hg\|Mtn\|Svn\)\|XC-Package-Type\|\%(XS-\)\=DM-Upload-Allowed\): *" 52 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\|Description\|Bugs\|Origin\|X[SB]-Python-Version\|Homepage\|\(XS-\)\=Vcs-\(Browser\|Arch\|Bzr\|Cvs\|Darcs\|Git\|Hg\|Mtn\|Svn\)\|XC-Package-Type\|\%(XS-\)\=DM-Upload-Allowed\): *"
57 53
58 " Fields for which we do strict syntax checking 54 " Fields for which we do strict syntax checking
59 syn region debcontrolStrictField start="^Architecture" end="$" contains=debcontrolKey,debcontrolArchitecture,debcontrolSpace oneline 55 syn region debcontrolStrictField start="^Architecture" end="$" contains=debcontrolKey,debcontrolArchitecture,debcontrolSpace oneline
60 syn region debcontrolStrictField start="^\(Package\|Source\)" end="$" contains=debcontrolKey,debcontrolName oneline 56 syn region debcontrolStrictField start="^\(Package\|Source\)" end="$" contains=debcontrolKey,debcontrolName oneline
61 syn region debcontrolStrictField start="^Priority" end="$" contains=debcontrolKey,debcontrolPriority oneline 57 syn region debcontrolStrictField start="^Priority" end="$" contains=debcontrolKey,debcontrolPriority oneline
68 syn region debcontrolStrictField start="^\%(XS-\)\=Vcs-Git" end="$" contains=debcontrolKey,debcontrolVcsGit oneline keepend 64 syn region debcontrolStrictField start="^\%(XS-\)\=Vcs-Git" end="$" contains=debcontrolKey,debcontrolVcsGit oneline keepend
69 syn region debcontrolStrictField start="^\%(XS-\)\=DM-Upload-Allowed" end="$" contains=debcontrolKey,debcontrolDmUpload oneline 65 syn region debcontrolStrictField start="^\%(XS-\)\=DM-Upload-Allowed" end="$" contains=debcontrolKey,debcontrolDmUpload oneline
70 66
71 " Catch-all for the other legal fields 67 " Catch-all for the other legal fields
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 68 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
73 syn region debcontrolMultiField start="^\%(Build-\%(Conflicts\|Depends\)\%(-Indep\)\=\|\%(Pre-\)\=Depends\|Recommends\|Suggests\|Provides\|Replaces\|Conflicts\|Enhances\|Uploaders\|Description\):" skip="^ " end="^$"me=s-1 end="^[^ #]"me=s-1 contains=debcontrolKey,debcontrolEmail,debcontrolVariable,debcontrolComment 69 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
74 70
75 " Associate our matches and regions with pretty colours 71 " Associate our matches and regions with pretty colours
76 if version >= 508 || !exists("did_debcontrol_syn_inits") 72 if version >= 508 || !exists("did_debcontrol_syn_inits")
77 if version < 508 73 if version < 508
78 let did_debcontrol_syn_inits = 1 74 let did_debcontrol_syn_inits = 1