annotate runtime/syntax/desc.vim @ 9:6a13985590e6

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