1 |
Author: spatz |
2 |
Date: 2010-04-05 19:46:05 +0000 (Mon, 05 Apr 2010) |
3 |
New Revision: 71 |
4 |
|
5 |
Added: |
6 |
trunk/gentoo-syntax/syntax/gentoo-package-license.vim |
7 |
trunk/gentoo-syntax/syntax/gentoo-package-properties.vim |
8 |
Modified: |
9 |
trunk/gentoo-syntax/Makefile |
10 |
trunk/gentoo-syntax/ftdetect/gentoo.vim |
11 |
trunk/gentoo-syntax/syntax/gentoo-make-conf.vim |
12 |
Log: |
13 |
Add support for package.{license,properties} and ACCEPT_{LICENSE,PROPERTIES}, bug 281481. |
14 |
|
15 |
Modified: trunk/gentoo-syntax/Makefile |
16 |
=================================================================== |
17 |
--- trunk/gentoo-syntax/Makefile 2010-04-01 22:10:31 UTC (rev 70) |
18 |
+++ trunk/gentoo-syntax/Makefile 2010-04-05 19:46:05 UTC (rev 71) |
19 |
@@ -47,7 +47,9 @@ |
20 |
syntax/gentoo-metadata.vim \ |
21 |
syntax/gentoo-mirrors.vim \ |
22 |
syntax/gentoo-package-keywords.vim \ |
23 |
+ syntax/gentoo-package-license.vim \ |
24 |
syntax/gentoo-package-mask.vim \ |
25 |
+ syntax/gentoo-package-properties.vim \ |
26 |
syntax/gentoo-package-use.vim \ |
27 |
syntax/gentoo-use-desc.vim \ |
28 |
syntax/glep.vim \ |
29 |
|
30 |
Modified: trunk/gentoo-syntax/ftdetect/gentoo.vim |
31 |
=================================================================== |
32 |
--- trunk/gentoo-syntax/ftdetect/gentoo.vim 2010-04-01 22:10:31 UTC (rev 70) |
33 |
+++ trunk/gentoo-syntax/ftdetect/gentoo.vim 2010-04-05 19:46:05 UTC (rev 71) |
34 |
@@ -62,6 +62,14 @@ |
35 |
au BufNewFile,BufRead {*/package.use,*/portage/package.use/*} |
36 |
\ set filetype=gentoo-package-use |
37 |
|
38 |
+" package.license |
39 |
+au BufNewFile,BufRead {*/package.license,*/portage/package.license/*} |
40 |
+ \ set filetype=gentoo-package-license |
41 |
+ |
42 |
+" package.properties |
43 |
+au BufNewFile,BufRead {*/package.properties,*/portage/package.properties/*} |
44 |
+ \ set filetype=gentoo-package-properties |
45 |
+ |
46 |
" thirdpartymirrors |
47 |
au BufNewFile,BufRead {*/thirdpartymirrors,*/portage/mirrors} |
48 |
\ set filetype=gentoo-mirrors |
49 |
|
50 |
Modified: trunk/gentoo-syntax/syntax/gentoo-make-conf.vim |
51 |
=================================================================== |
52 |
--- trunk/gentoo-syntax/syntax/gentoo-make-conf.vim 2010-04-01 22:10:31 UTC (rev 70) |
53 |
+++ trunk/gentoo-syntax/syntax/gentoo-make-conf.vim 2010-04-05 19:46:05 UTC (rev 71) |
54 |
@@ -17,7 +17,7 @@ |
55 |
|
56 |
runtime syntax/gentoo-common.vim |
57 |
|
58 |
-syn cluster GentooMakeConfEC add=GentooMakeConfEUse,GentooMakeConfEAK,GentooMakeConfECFLAGS,GentooMakeConfELDFLAGS,GentooMakeConfEMAKEOPTS,GentooMakeConfECHOST,GentooMakeConfEFEATURES,GentooMakeConfEMISC,GentooMakeConfEMISCK,GentooMakeConfEMISCKE,GentooMakeConfEMISCN |
59 |
+syn cluster GentooMakeConfEC add=GentooMakeConfEUse,GentooMakeConfEAK,GentooMakeConfEAL,GentooMakeConfEAP,GentooMakeConfECFLAGS,GentooMakeConfELDFLAGS,GentooMakeConfEMAKEOPTS,GentooMakeConfECHOST,GentooMakeConfEFEATURES,GentooMakeConfEMISC,GentooMakeConfEMISCK,GentooMakeConfEMISCKE,GentooMakeConfEMISCN |
60 |
syn region GentooMakeConfE start=/^/ end=/$/ contains=@GentooMakeConfEC,GentooMakeConfComment |
61 |
|
62 |
" MISC {{{ |
63 |
@@ -84,6 +84,40 @@ |
64 |
hi def link GentooMakeConfEAKIX Preproc |
65 |
" }}} |
66 |
|
67 |
+" ACCEPT_LICENSE {{{ |
68 |
+syn match GentooMakeConfEAL /ACCEPT_LICENSE/ contained nextgroup=GentooMakeConfEALE skipwhite |
69 |
+syn match GentooMakeConfEALE /=/ contained nextgroup=GentooMakeConfEALV skipwhite |
70 |
+syn cluster GentooMakeConfEALIC add=GentooMakeConfEALIP,GentooMakeConfEALIS,GentooMakeConfEALIN,GentooMakeConfEALIX |
71 |
+syn region GentooMakeConfEALV contained start=/"/ end=/"/ contains=@GentooMakeConfEALIC |
72 |
+syn match GentooMakeConfEALIP /\*\|[a-zA-Z0-9\-_.+]\+/ contained |
73 |
+syn match GentooMakeConfEALIS /@[a-zA-Z0-9\-_.+]\+/ contained |
74 |
+syn match GentooMakeConfEALIN /-\*\|-@\?[a-zA-Z0-9\-_.+]\+/ contained |
75 |
+syn match GentooMakeConfEALIX /\\.\|\$\({[^}]\+}\|[a-zA-Z0-9\-\_]\+\)/ contained |
76 |
+ |
77 |
+hi def link GentooMakeConfEAL Identifier |
78 |
+hi def link GentooMakeConfEALV String |
79 |
+hi def link GentooMakeConfEALIP Keyword |
80 |
+hi def link GentooMakeConfEALIS Special |
81 |
+hi def link GentooMakeConfEALIN Error |
82 |
+hi def link GentooMakeConfEALIX Preproc |
83 |
+" }}} |
84 |
+ |
85 |
+" ACCEPT_PROPERTIES {{{ |
86 |
+syn match GentooMakeConfEAP /ACCEPT_PROPERTIES/ contained nextgroup=GentooMakeConfEAPE skipwhite |
87 |
+syn match GentooMakeConfEAPE /=/ contained nextgroup=GentooMakeConfEAPV skipwhite |
88 |
+syn cluster GentooMakeConfEAPIC add=GentooMakeConfEAPIP,GentooMakeConfEAPIN,GentooMakeConfEAPIX |
89 |
+syn region GentooMakeConfEAPV contained start=/"/ end=/"/ contains=@GentooMakeConfEAPIC |
90 |
+syn match GentooMakeConfEAPIP /\*\|[a-zA-Z0-9\-_]\+/ contained |
91 |
+syn match GentooMakeConfEAPIN /-\*\|-[a-zA-Z0-9\-_]\+/ contained |
92 |
+syn match GentooMakeConfEAPIX /\\.\|\$\({[^}]\+}\|[a-zA-Z0-9\-\_]\+\)/ contained |
93 |
+ |
94 |
+hi def link GentooMakeConfEAP Identifier |
95 |
+hi def link GentooMakeConfEAPV String |
96 |
+hi def link GentooMakeConfEAPIP Keyword |
97 |
+hi def link GentooMakeConfEAPIN Error |
98 |
+hi def link GentooMakeConfEAPIX Preproc |
99 |
+" }}} |
100 |
+ |
101 |
" C*FLAGS {{{ |
102 |
syn match GentooMakeConfECFLAGS /C\(XX\)\?FLAGS/ contained nextgroup=GentooMakeConfECFLAGSE skipwhite |
103 |
syn match GentooMakeConfECFLAGSE /=/ contained nextgroup=GentooMakeConfECFLAGSV,GentooMakeConfECFLAGSVNoQ skipwhite |
104 |
|
105 |
Added: trunk/gentoo-syntax/syntax/gentoo-package-license.vim |
106 |
=================================================================== |
107 |
--- trunk/gentoo-syntax/syntax/gentoo-package-license.vim (rev 0) |
108 |
+++ trunk/gentoo-syntax/syntax/gentoo-package-license.vim 2010-04-05 19:46:05 UTC (rev 71) |
109 |
@@ -0,0 +1,39 @@ |
110 |
+" Vim syntax file |
111 |
+" Language: Gentoo package.license files |
112 |
+" Author: Dror Levin <spatz@g.o |
113 |
+" Copyright: Copyright (c) 2010 Dror Levin |
114 |
+" Licence: You may redistribute this under the same terms as Vim itself |
115 |
+" |
116 |
+" Syntax highlighting for Gentoo package.license files. Requires vim 6.3 or |
117 |
+" later. |
118 |
+" |
119 |
+ |
120 |
+if &compatible || v:version < 603 |
121 |
+ finish |
122 |
+endif |
123 |
+ |
124 |
+if exists("b:current_syntax") |
125 |
+ finish |
126 |
+endif |
127 |
+ |
128 |
+runtime syntax/gentoo-common.vim |
129 |
+ |
130 |
+syn region GentooPackageLicenseComment start=/#/ end=/$/ |
131 |
+ \ contains=GentooPackageLicenseEmail,GentooPackageLicenseDate,GentooBug |
132 |
+ |
133 |
+syn match GentooPackageLicenseEmail contained /<[a-zA-Z0-9\-\_]\+@[a-zA-Z0-9\-\_\.]\+>/ |
134 |
+syn match GentooPackageLicenseDate contained /(\(\d\d\?\s\w\+\|\w\+\s\d\d\?\)\s\d\{4\})/ |
135 |
+ |
136 |
+syn match GentooPackageLicenseAtom /^[^ \t\n#]\+\S\+\/\S\+/ |
137 |
+ \ nextgroup=GentooPackageLicenseLicense skipwhite |
138 |
+syn match GentooPackageLicenseLicense contained /-\?@\?\([a-zA-Z0-9\-_.+]\+\|\*\)/ |
139 |
+ \ nextgroup=GentooPackageLicenseLicense skipwhite |
140 |
+ |
141 |
+hi def link GentooPackageLicenseComment Comment |
142 |
+hi def link GentooPackageLicenseEmail Special |
143 |
+hi def link GentooPackageLicenseDate Number |
144 |
+hi def link GentooPackageLicenseAtom Identifier |
145 |
+hi def link GentooPackageLicenseLicense Keyword |
146 |
+ |
147 |
+let b:current_syntax = "gentoo-package-license" |
148 |
+ |
149 |
|
150 |
Added: trunk/gentoo-syntax/syntax/gentoo-package-properties.vim |
151 |
=================================================================== |
152 |
--- trunk/gentoo-syntax/syntax/gentoo-package-properties.vim (rev 0) |
153 |
+++ trunk/gentoo-syntax/syntax/gentoo-package-properties.vim 2010-04-05 19:46:05 UTC (rev 71) |
154 |
@@ -0,0 +1,39 @@ |
155 |
+" Vim syntax file |
156 |
+" Language: Gentoo package.keywords files |
157 |
+" Author: Ciaran McCreesh <ciaranm@g.o> |
158 |
+" Copyright: Copyright (c) 2004-2005 Ciaran McCreesh |
159 |
+" Licence: You may redistribute this under the same terms as Vim itself |
160 |
+" |
161 |
+" Syntax highlighting for Gentoo package.keywords files. Requires vim 6.3 or |
162 |
+" later. |
163 |
+" |
164 |
+ |
165 |
+if &compatible || v:version < 603 |
166 |
+ finish |
167 |
+endif |
168 |
+ |
169 |
+if exists("b:current_syntax") |
170 |
+ finish |
171 |
+endif |
172 |
+ |
173 |
+runtime syntax/gentoo-common.vim |
174 |
+ |
175 |
+syn region GentooPackagePropertiesComment start=/#/ end=/$/ |
176 |
+ \ contains=GentooPackagePropertiesEmail,GentooPackagePropertiesDate,GentooBug |
177 |
+ |
178 |
+syn match GentooPackagePropertiesEmail contained /<[a-zA-Z0-9\-\_]\+@[a-zA-Z0-9\-\_\.]\+>/ |
179 |
+syn match GentooPackagePropertiesDate contained /(\(\d\d\?\s\w\+\|\w\+\s\d\d\?\)\s\d\{4\})/ |
180 |
+ |
181 |
+syn match GentooPackagePropertiesAtom /^[^ \t\n#]\+\S\+\/\S\+/ |
182 |
+ \ nextgroup=GentooPackagePropertiesProperty skipwhite |
183 |
+syn match GentooPackagePropertiesProperty contained /-\?\([a-zA-Z0-9\-_]\+\|\*\)/ |
184 |
+ \ nextgroup=GentooPackagePropertiesProperty skipwhite |
185 |
+ |
186 |
+hi def link GentooPackagePropertiesComment Comment |
187 |
+hi def link GentooPackagePropertiesEmail Special |
188 |
+hi def link GentooPackagePropertiesDate Number |
189 |
+hi def link GentooPackagePropertiesAtom Identifier |
190 |
+hi def link GentooPackagePropertiesProperty Keyword |
191 |
+ |
192 |
+let b:current_syntax = "gentoo-package-properties" |
193 |
+ |