7
|
1 " Vim syntax file
|
819
|
2 " Language: T2 / ROCK Linux .desc
|
|
3 " Maintainer: René Rebe <rene@exactcode.de>, Piotr Esden-Tempski <esden@rocklinux.org>
|
1121
|
4 " Last Change: 2006 Aug 14
|
7
|
5
|
|
6 " For version 5.x: Clear all syntax items
|
|
7 " For version 6.x: Quit when a syntax file was already loaded
|
|
8 if version < 600
|
|
9 syntax clear
|
|
10 elseif exists("b:current_syntax")
|
|
11 finish
|
|
12 endif
|
|
13
|
|
14 " syntax definitions
|
|
15
|
|
16 setl iskeyword+=-
|
1121
|
17 syn keyword descFlag DIETLIBC KAFFE JAIL NOPARALLEL FPIC-QUIRK LIBTOOL-WUIRK NO-LIBTOOL-FIX AUTOMAKE-QUIRK NO-AS-NEEDED NO-SSP KERNEL INIT LIBC CC CXX F77 KCC contained
|
7
|
18 syn keyword descLicense Unknown GPL LGPL FDL MIT BSD OpenSource Free-to-use Commercial contained
|
|
19
|
|
20 " tags
|
819
|
21 syn match descTag /^\[\(COPY\)\]/
|
7
|
22 syn match descTag /^\[\(I\|TITLE\)\]/
|
|
23 syn match descTag /^\[\(T\|TEXT\)\]/ contained
|
|
24 syn match descTag /^\[\(U\|URL\)\]/
|
|
25 syn match descTag /^\[\(A\|AUTHOR\)\]/
|
|
26 syn match descTag /^\[\(M\|MAINTAINER\)\]/
|
|
27 syn match descTag /^\[\(C\|CATEGORY\)\]/ contained
|
|
28 syn match descTag /^\[\(F\|FLAG\)\]/ contained
|
|
29 syn match descTag /^\[\(E\|DEP\|DEPENDENCY\)\]/
|
|
30 syn match descTag /^\[\(R\|ARCH\|ARCHITECTURE\)\]/
|
|
31 syn match descTag /^\[\(L\|LICENSE\)\]/ contained
|
|
32 syn match descTag /^\[\(S\|STATUS\)\]/
|
819
|
33 syn match descTag /^\[\(O\|CONF\)\]/
|
7
|
34 syn match descTag /^\[\(V\|VER\|VERSION\)\]/
|
|
35 syn match descTag /^\[\(P\|PRI\|PRIORITY\)\]/ nextgroup=descInstall skipwhite
|
|
36 syn match descTag /^\[\(D\|DOWN\|DOWNLOAD\)\]/ nextgroup=descSum skipwhite
|
|
37
|
|
38 " misc
|
|
39 syn match descUrl /\w\+:\/\/\S\+/
|
|
40 syn match descCategory /\w\+\/\w\+/ contained
|
819
|
41 syn match descEmail /<[\.A-Za-z0-9]\+@[\.A-Za-z0-9]\+>/
|
7
|
42
|
|
43 " priority tag
|
|
44 syn match descInstallX /X/ contained
|
|
45 syn match descInstallO /O/ contained
|
|
46 syn match descInstall /[OX]/ contained contains=descInstallX,descInstallO nextgroup=descStage skipwhite
|
|
47 syn match descDash /-/ contained
|
|
48 syn match descDigit /\d/ contained
|
|
49 syn match descStage /[\-0][\-1][\-2][\-3][\-4][\-5][\-6][\-7][\-8][\-9]/ contained contains=descDash,descDigit nextgroup=descCompilePriority skipwhite
|
|
50 syn match descCompilePriority /\d\{3}\.\d\{3}/ contained
|
|
51
|
|
52 " download tag
|
|
53 syn match descSum /\d\+/ contained nextgroup=descTarball skipwhite
|
|
54 syn match descTarball /\S\+/ contained nextgroup=descUrl skipwhite
|
|
55
|
|
56
|
|
57 " tag regions
|
|
58 syn region descText start=/^\[\(T\|TEXT\)\]/ end=/$/ contains=descTag,descUrl,descEmail
|
|
59
|
|
60 syn region descTagRegion start=/^\[\(C\|CATEGORY\)\]/ end=/$/ contains=descTag,descCategory
|
|
61
|
|
62 syn region descTagRegion start=/^\[\(F\|FLAG\)\]/ end=/$/ contains=descTag,descFlag
|
|
63
|
|
64 syn region descTagRegion start=/^\[\(L\|LICENSE\)\]/ end=/$/ contains=descTag,descLicense
|
|
65
|
|
66 " For version 5.7 and earlier: only when not done already
|
|
67 " Define the default highlighting.
|
|
68 " For version 5.8 and later: only when an item doesn't have highlighting yet
|
|
69 if version >= 508 || !exists("did_desc_syntax_inits")
|
|
70 if version < 508
|
|
71 let did_desc_syntax_inits = 1
|
|
72 command -nargs=+ HiLink hi link <args>
|
|
73 else
|
|
74 command -nargs=+ HiLink hi def link <args>
|
|
75 endif
|
|
76
|
|
77 HiLink descFlag Identifier
|
|
78 HiLink descLicense Identifier
|
|
79 HiLink descCategory Identifier
|
|
80
|
|
81 HiLink descTag Type
|
|
82 HiLink descUrl Underlined
|
|
83 HiLink descEmail Underlined
|
|
84
|
|
85 " priority tag colors
|
|
86 HiLink descInstallX Boolean
|
|
87 HiLink descInstallO Type
|
|
88 HiLink descDash Operator
|
|
89 HiLink descDigit Number
|
|
90 HiLink descCompilePriority Number
|
|
91
|
|
92 " download tag colors
|
|
93 HiLink descSum Number
|
|
94 HiLink descTarball Underlined
|
|
95
|
|
96 " tag region colors
|
|
97 HiLink descText Comment
|
|
98
|
|
99 delcommand HiLink
|
|
100 endif
|
|
101
|
|
102 let b:current_syntax = "desc"
|