as3525v2: document PLL bits and show current PLL frequency in the debug menu
[kugel-rb.git] / utils / editors / wps.vim
blob094771ef9cca626bb9fdb044ece22fdaa6d803c5
1 """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
2 "             __________               __   ___.
3 "   Open      \______   \ ____   ____ |  | _\_ |__   _______  ___
4 "   Source     |       _//  _ \_/ ___\|  |/ /| __ \ /  _ \  \/  /
5 "   Jukebox    |    |   (  <_> )  \___|    < | \_\ (  <_> > <  <
6 "   Firmware   |____|_  /\____/ \___  >__|_ \|___  /\____/__/\_ \
7 "                     \/            \/     \/    \/            \/
8 " $Id$
10 " Vim syntax file for Rockbox WPS (While Playing Screen) definitions.
11 " Copyright (C) 2009 by Kevin Schoedel
13 " This program is free software; you can redistribute it and/or
14 " modify it under the terms of the GNU General Public License
15 " as published by the Free Software Foundation; either version 2
16 " of the License, or (at your option) any later version.
18 " This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
19 " KIND, either express or implied.
21 """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
23 if exists("b:current_syntax")
24     finish
25 endif
27 syn case match
29 " Highlight trailing white space.
30 if exists("c_space_errors")
31     if !exists("c_no_trail_space_error")
32         syn match wpsSpaceError display excludenl   "\s\+$"
33     endif
34     if !exists("c_no_tab_space_error")
35         syn match wpsSpaceError display             " \+\t"me=e-1
36     endif
37 endif
40 " Comments.
41 syn keyword wpsTodo             contained TODO FIXME XXX
42 syn cluster wpsCommentGroup     contains=wpsTodo
43 syn region  wpsComment          start="#" end="$" keepend contains=@wpsCommentGroup,wpsSpaceError,@Spell
45 " Delimiters.
46 syn match   wpsPipeError        "|"
47 syn match   wpsSep              "|"                     contained
48 syn match   wpsSubline          ";"
49 syn match   wpsPct              "%"                     nextgroup=wpsSpecial,wpsCond,@wpsTag
51 " Literals.
52 syn match   wpsSpecial          "[%<|>;#]"              contained
54 " Conditional test.
55 syn match   wpsCond             "?"                     nextgroup=@wpsTag
56 syn match   wpsElse             "|"                     contained
57 syn match   wpsEndIfError       ">"
58 syn match   wpsIfEndIf          "[<>]"                  contained
59 syn region  wpsConditions       matchgroup=wpsIfEndIf start="<" end=">" skip="%>" contains=wpsElse,wpsConditions,wpsPct,wpsSubline
60 hi def link wpsCond             wpsConditional
61 hi def link wpsIfEndIf          wpsConditional
62 hi def link wpsElse             wpsConditional
64 " Tags not otherwise defined (overridden by known tags).
65 syn match   wpsUnknownTag       "\a\+"                  contained
66 syn cluster wpsTag              add=wpsUnknownTag
67 hi def link wpsUnknownTag       wpsTagError
70 " Known tags are defined individually, so that the user can classify
71 " and colour them differently if desired.
74 " %a -- Alignment tags.
76 syn match   wpsAlignError       "a\a"                   contained
77 syn cluster wpsTag              add=wpsAlignError
78 hi def link wpsAlignError       wpsTagError
80 syn match   wpsAlignTag         "a[lcr]"                contained
81 syn cluster wpsTag              add=wpsAlignTag
82 hi def link wpsAlignTag         wpsTag
85 " %b -- Power tags.
87 syn match   wpsPowerError       "b\a"                   contained
88 syn cluster wpsTag              add=wpsPowerError
89 hi def link wpsPowerError       wpsTagError
91 syn match   wpsPowerTag         "b[clpstv]"             contained
92 syn cluster wpsTag              add=wpsPowerTag
93 hi def link wpsPowerTag         wpsTag
96 " %c -- Clock tags.
98 syn match   wpsClockError       "c\a"                   contained
99 syn cluster wpsTag              add=wpsClockError
100 hi def link wpsClockError       wpsTagError
102 syn match   wpsClockTag         "c[abdefklmpuwyHIMPSY]"  contained
103 syn cluster wpsTag              add=wpsClockTag
104 hi def link wpsClockTag         wpsTag
107 " %C -- Album art tags.
109 syn match   wpsAlbumArtError    "C\a"                   contained
110 syn cluster wpsTag              add=wpsAlbumArtError
111 hi def link wpsAlbumArtError    wpsTagError
113 syn match   wpsDefAlbumArtTag   "Cl|"he=e-1             contained contains=wpsSep nextgroup=wpsDefAlbumArtX
114 syn match   wpsDefAlbumArtX     "\d\+|"he=e-1           contained contains=wpsSep nextgroup=wpsDefAlbumArtY
115 syn match   wpsDefAlbumArtY     "\d\+|"he=e-1           contained contains=wpsSep nextgroup=wpsDefAlbumArtW
116 syn match   wpsDefAlbumArtW     "\([lcrs]\?\d\+\)\?|"he=e-1 contained contains=wpsSep nextgroup=wpsDefAlbumArtH
117 syn match   wpsDefAlbumArtH     "\([tcbs]\?\d\+\)\?|"he=e-1 contained contains=wpsSep
118 syn cluster wpsTag              add=wpsDefAlbumArtTag
119 hi def link wpsDefAlbumArtTag   wpsAlbumArtTags
120 hi def link wpsDefAlbumArtX     wpsAlbumArtArgs
121 hi def link wpsDefAlbumArtY     wpsAlbumArtArgs
122 hi def link wpsDefAlbumArtW     wpsAlbumArtArgs
123 hi def link wpsDefAlbumArtH     wpsAlbumArtArgs
124 hi def link wpsAlbumArtArgs     wpsArgs
126 syn match   wpsRefAlbumArtTag   "C\>"                   contained
127 syn cluster wpsTag              add=wpsRefAlbumArtTag
128 hi def link wpsRefAlbumArtTag   wpsAlbumArtTags
130 hi def link wpsAlbumArtTags     wpsTag
133 " %d -- Directory tags.
135 syn match   wpsDirError         "d\a"                   contained
136 syn match   wpsNextDirError     "D\a"                   contained
137 syn cluster wpsTag              add=wpsDirError,wpsNextDirError
138 hi def link wpsDirError         wpsTagError
139 hi def link wpsNextDirError     wpsTagError
141 syn match   wpsDirTag           "d[123]"                contained
142 syn match   wpsNextDirTag       "D[123]"                contained
143 syn cluster wpsTag              add=wpsDirTag,wpsNextDirTag
144 hi def link wpsDirTag           wpsDirTags
145 hi def link wpsNextDirTag       wpsDirTags
146 hi def link wpsDirTags          wpsTag
149 " %f -- File tags.
151 syn match   wpsFileError        "f\a"                   contained
152 syn match   wpsNextFileError    "F\a"                   contained
153 syn cluster wpsTag              add=wpsFileError,wpsNextFileError
154 hi def link wpsFileError        wpsTagError
155 hi def link wpsNextFileError    wpsTagError
157 syn match   wpsFileTag          "f[bcfkmnpsv]"          contained
158 syn match   wpsNextFileTag      "F[bcfkmnpsv]"          contained
159 syn cluster wpsTag              add=wpsFileTag,wpsNextFileTag
160 hi def link wpsFileTag          wpsFileTags
161 hi def link wpsNextFileTag      wpsFileTags
162 hi def link wpsFileTags         wpsTag
165 " %i -- ID3 tags.
167 syn match   wpsID3Error         "i\a"                   contained
168 syn match   wpsNextID3Error     "I\a"                   contained
169 syn cluster wpsTag              add=wpsID3Error,wpsNextID3Error
170 hi def link wpsID3Error         wpsTagError
171 hi def link wpsNextID3Error     wpsTagError
173 syn match   wpsID3Tag           "i[acdgntvykAGC]"       contained
174 syn match   wpsNextID3Tag       "I[acdgntvykAGC]"       contained
175 syn cluster wpsTag              add=wpsID3Tag,wpsNextID3Tag
176 hi def link wpsID3Tag           wpsID3Tags
177 hi def link wpsNextID3Tag       wpsID3Tags
178 hi def link wpsID3Tags          wpsTag
181 " %l -- LED tags.
183 syn match   wpsLEDError         "l\a"                   contained
184 syn cluster wpsTag              add=wpsLEDError
185 hi def link wpsLEDError         wpsTagError
187 syn match   wpsLEDTag           "l[h]"                  contained
188 syn cluster wpsTag              add=wpsLEDTag
189 hi def link wpsLEDTag           wpsTag
192 " %m -- Mode tags.
194 syn match   wpsModeError        "m\a"                   contained
195 syn cluster wpsTag              add=wpsModeError
196 hi def link wpsModeError        wpsTagError
198 syn match   wpsHoldTag          "m[hr]"                 contained
199 hi def link wpsHoldTag          wpsTag
200 syn cluster wpsTag              add=wpsHoldTag
202 syn match   wpsPlaybackTag      "mp"                    contained
203 hi def link wpsPlaybackTag      wpsTag
204 syn cluster wpsTag              add=wpsPlaybackTag
206 syn match   wpsRepeatTag        "mm"                    contained
207 hi def link wpsRepeatTag        wpsTag
208 syn cluster wpsTag              add=wpsRepeatTag
210 syn match   wpsVolumeTag        "mv"                    contained
211 hi def link wpsVolumeTag        wpsTag
212 syn cluster wpsTag              add=wpsVolumeTag
215 " %p -- Playlist/Song tags.
217 syn match   wpsSongError        "p\a"                   contained
218 syn cluster wpsTag              add=wpsSongError
219 hi def link wpsSongError        wpsTagError
221 syn match   wpsSongTag          "p[cefmnprstvx]"        contained
222 syn cluster wpsTag              add=wpsSongTag
223 hi def link wpsSongTag          wpsTag
225 syn match   wpsProgress6Tag     "pb"                    contained
226 syn cluster wpsTag              add=wpsProgress6Tag
227 hi def link wpsProgress6Tag     wpsTag
229 syn match   wpsProgressTag      "pb|"                   contained contains=wpsSep nextgroup=wpsProgressFile
230 syn match   wpsProgressFile     "[^|]\+|"he=e-1         contained contains=wpsSep nextgroup=wpsProgressX
231 syn match   wpsProgressX        "\(-\|\d\+\)|"he=e-1    contained contains=wpsSep nextgroup=wpsProgressY
232 syn match   wpsProgressY        "\(-\|\d\+\)|"he=e-1    contained contains=wpsSep nextgroup=wpsProgressW
233 syn match   wpsProgressW        "\(-\|\d\+\)|"he=e-1    contained contains=wpsSep nextgroup=wpsProgressH
234 syn match   wpsProgressH        "\(-\|\d\+\)|"he=e-1    contained contains=wpsSep
235 syn cluster wpsTag              add=wpsProgressTag
236 hi def link wpsProgressTag      wpsTag
237 hi def link wpsProgressFile     wpsProgressArgs
238 hi def link wpsProgressX        wpsProgressArgs
239 hi def link wpsProgressY        wpsProgressArgs
240 hi def link wpsProgressW        wpsProgressArgs
241 hi def link wpsProgressH        wpsProgressArgs
242 hi def link wpsProgressArgs     wpsArgs
245 " %r -- Runtime/Replaygain tags.
247 syn match   wpsRuntimeError     "r\a"                   contained
248 syn cluster wpsTag              add=wpsRuntimeError
249 hi def link wpsRuntimeError     wpsTagError
251 syn match   wpsRuntimeTag       "r[apr]"                contained
252 syn cluster wpsTag              add=wpsRuntimeTag
253 hi def link wpsRuntimeTag       wpsTag
255 syn match   wpsReplaygainTag    "rg"                    contained
256 syn cluster wpsTag              add=wpsReplaygainTag
257 hi def link wpsReplaygainTag    wpsTag
260 " %s -- Scrolling tag.
262 syn match   wpsScrollError      "s\a"                   contained
263 syn cluster wpsTag              add=wpsScrollError
264 hi def link wpsScrollError      wpsTagError
266 syn match   wpsScrollTag        "s\>"                   contained
267 syn cluster wpsTag              add=wpsScrollTag
268 hi def link wpsScrollTag        wpsTag
271 " %S -- Settings tags.
273 syn match   wpsSettingError     "S\a"                   contained
274 syn cluster wpsTag              add=wpsSettingError
275 hi def link wpsSettingError     wpsTagError
277 syn match   wpsSettingTag       "St|"he=e-1             contained contains=wpsSep nextgroup=wpsSettingName
278 syn match   wpsSettingName      "[^|]\+|"he=e-1         contained contains=wpsSep
279 syn cluster wpsTag              add=wpsSettingTag
280 hi def link wpsSettingTag       wpsTag
281 hi def link wpsSettingName      wpsSettingArgs
282 hi def link wpsSettingArgs      wpsArgs
284 syn match   wpsPitchTag         "Sp\>"                  contained
285 syn cluster wpsTag              add=wpsPitchTag
286 hi def link wpsPitchTag         wpsTag
288 syn match   wpsTranslatedTag    "Sx|"he=e-1             contained contains=wpsSep nextgroup=wpsTranslatedText
289 syn match   wpsTranslatedText   "[^|]\+|"he=e-1         contained contains=wpsSep
290 syn cluster wpsTag              add=wpsTranslatedTag
291 hi def link wpsTranslatedTag    wpsTag
292 hi def link wpsTranslatedText   wpsTranslatedArgs
293 hi def link wpsTranslatedArgs   wpsArgs
295 syn match   wpsLangIsRtlTag     "Sr"                    contained
296 hi def link wpsLangIsRtlTag     wpsArgs
297 syn cluster wpsTag              add=wpsLangIsRTLTag
299 " %t -- Alternation tags.
301 syn match   wpsAlternateError   "t"                     contained
302 syn cluster wpsTag              add=wpsAlternateError
303 hi def link wpsAlternateError   wpsTagError
305 syn match   wpsAlternateTag     "t\d"me=e-1             contained contains=wpsSep nextgroup=wpsAlternateTime
306 syn match   wpsAlternateTime    "\d\+\(\.\d+\)\?"       contained
307 syn cluster wpsTag              add=wpsAlternateTag
308 hi def link wpsAlternateTag     wpsTag
309 hi def link wpsAlternateTime    wpsAlternateArgs
310 hi def link wpsAlternateArgs    wpsArgs
313 " %V -- Viewport tags.
315 syn match   wpsViewportError    "V\a"                   contained
316 syn cluster wpsTag              add=wpsViewportError
317 hi def link wpsViewportError    wpsTagError
319 syn match   wpsViewportTag      "V|"he=e-1              contained contains=wpsSep nextgroup=wpsViewportX
320 syn cluster wpsTag              add=wpsViewportTag
321 hi def link wpsViewportTag      wpsViewportTags
323 syn match   wpsDefViewportTag   "Vl|"he=e-1             contained contains=wpsSep nextgroup=wpsDefViewportId
324 syn match   wpsDefViewportId    "\a|"he=e-1             contained contains=wpsSep nextgroup=wpsViewportX
325 syn match   wpsViewportX        "\d\+|"he=e-1           contained contains=wpsSep nextgroup=wpsViewportY
326 syn match   wpsViewportY        "\d\+|"he=e-1           contained contains=wpsSep nextgroup=wpsViewportW
327 syn match   wpsViewportW        "\(-\|\d\+\)|"he=e-1    contained contains=wpsSep nextgroup=wpsViewportH
328 syn match   wpsViewportH        "\(-\|\d\+\)|"he=e-1    contained contains=wpsSep nextgroup=wpsViewportFont
329 syn match   wpsViewportFont     "[-01]|"he=e-1          contained contains=wpsSep nextgroup=wpsViewportShade,wpsViewportFG
330 syn match   wpsViewportShade    "[-0-3]|"he=e-1         contained contains=wpsSep
331 syn match   wpsViewportFG       "\(-\|\x\{6}\)|"he=e-1  contained contains=wpsSep nextgroup=wpsViewportBG
332 syn match   wpsViewportBG       "\(-\|\x\{6}\)|"he=e-1  contained contains=wpsSep
333 syn cluster wpsTag              add=wpsDefViewportTag
334 hi def link wpsDefViewportId    wpsDefId
335 hi def link wpsDefViewportTag   wpsViewportTags
336 hi def link wpsViewportX        wpsViewportArgs
337 hi def link wpsViewportY        wpsViewportArgs
338 hi def link wpsViewportW        wpsViewportArgs
339 hi def link wpsViewportH        wpsViewportArgs
340 hi def link wpsViewportFont     wpsViewportArgs
341 hi def link wpsViewportShade    wpsViewportArgs
342 hi def link wpsViewportFG       wpsViewportArgs
343 hi def link wpsViewportBG       wpsViewportArgs
344 hi def link wpsViewportArgs     wpsArgs
346 syn match   wpsRefViewportTag   "Vd"                    nextgroup=wpsRefViewportId
347 syn match   wpsRefViewportId    "\a"                    contained
348 syn cluster wpsTag              add=wpsRefViewportTag
349 hi def link wpsRefViewportTag   wpsViewportTags
350 hi def link wpsRefViewportId    wpsRefId
352 hi def link wpsViewportTags     wpsTag
355 " %w -- Status bar tags.
357 syn match   wpsStatusBarError   "w\a"                   contained
358 syn cluster wpsTag              add=wpsStatusBarError
359 hi def link wpsStatusBarError   wpsTagError
361 syn match   wpsStatusBarTag     "w[ed]"                 contained
362 syn cluster wpsTag              add=wpsStatusBarTag
363 hi def link wpsStatusBarTag     wpsTag
366 " %x -- Image/Crossfade tags.
368 syn match   wpsImageError       "x\a"                   contained
369 syn cluster wpsTag              add=wpsImageError
370 hi def link wpsImageError       wpsTagError
372 syn match   wpsLoadImageTag     "xl|"he=e-1             contained contains=wpsSep nextgroup=wpsLoadImageId
373 syn match   wpsLoadImageId      "\a|"he=e-1             contained contains=wpsSep nextgroup=wpsLoadImageFile
374 syn match   wpsLoadImageFile    "[^|]\+|"he=e-1         contained contains=wpsSep nextgroup=wpsLoadImageX
375 syn match   wpsLoadImageX       "\d\+|"he=e-1           contained contains=wpsSep nextgroup=wpsLoadImageY
376 syn match   wpsLoadImageY       "\d\+|"he=e-1           contained contains=wpsSep
377 syn cluster wpsTag              add=wpsLoadImageTag
378 hi def link wpsLoadImageTag     wpsImageTags
379 hi def link wpsLoadImageFile    wpsImageArgs
380 hi def link wpsLoadImageX       wpsImageArgs
381 hi def link wpsLoadImageY       wpsImageArgs
383 syn match   wpsDefImageTag      "xl|"he=e-1             contained contains=wpsSep nextgroup=wpsDefImageId
384 syn match   wpsDefImageId       "\a|"he=e-1             contained contains=wpsSep nextgroup=wpsDefImageFile
385 syn match   wpsDefImageFile     "[^|]\+|"he=e-1         contained contains=wpsSep nextgroup=wpsDefImageX
386 syn match   wpsDefImageX        "\d\+|"he=e-1           contained contains=wpsSep nextgroup=wpsDefImageY
387 syn match   wpsDefImageY        "\d\+|"he=e-1           contained contains=wpsSep nextgroup=wpsDefImageCount
388 syn match   wpsDefImageCount    "\d\+|"he=e-1           contained contains=wpsSep
389 syn cluster wpsTag              add=wpsDefImageTag
390 hi def link wpsDefImageTag      wpsImageTags
391 hi def link wpsDefImageId       wpsDefId
392 hi def link wpsDefImageFile     wpsImageArgs
393 hi def link wpsDefImageX        wpsImageArgs
394 hi def link wpsDefImageY        wpsImageArgs
395 hi def link wpsDefImageCount    wpsImageArgs
397 syn match   wpsRefImageTag      "xd"                    nextgroup=wpsRefImageId
398 syn match   wpsRefImageId       "\a"                    contained nextgroup=wpsRefImageBitmap
399 syn match   wpsRefImageBitmap   "\a"                    contained
400 syn cluster wpsTag              add=wpsRefImageTag
401 hi def link wpsRefImageTag      wpsImageTags
402 hi def link wpsRefImageId       wpsRefId
403 hi def link wpsRefImageBitmap   wpsRefId
405 hi def link wpsImageTags        wpsTag
406 hi def link wpsImageArgs        wpsArgs
409 syn match   wpsCrossfadeTag     "xf"                    contained
410 syn cluster wpsTag              add=wpsCrossfadeTag
411 hi def link wpsCrossfadeTag     wpsTag
414 " %X -- Backdrop tag.
416 syn match   wpsBackdropError    "X\a"                   contained
417 syn cluster wpsTag              add=wpsBackdropError
418 hi def link wpsBackdropError    wpsTagError
420 syn match   wpsBackdropTag      "X|"                    contained contains=wpsSep nextgroup=wpsBackdropFile
421 syn match   wpsBackdropFile     "[^|]\+|"he=e-1         contained contains=wpsSep
422 syn cluster wpsTag              add=wpsBackdropTag
423 hi def link wpsBackdropTag      wpsTag
424 hi def link wpsBackdropFile     wpsBackdropArgs
425 hi def link wpsBackdropArgs     wpsArgs
429 hi def link wpsDefId            wpsIdentifier
430 hi def link wpsRefId            wpsIdentifier
432 hi def link wpsPct              wpsOperator
433 hi def link wpsSep              wpsOperator
434 hi def link wpsSubline          wpsOperator
436 hi def link wpsPipeError        wpsError
437 hi def link wpsEndIfError       wpsError
438 hi def link wpsTagError         wpsError
439 hi def link wpsSpaceError       wpsError
441 hi def link wpsError            Error
442 hi def link wpsComment          Comment
443 hi def link wpsTodo             Todo
444 hi def link wpsSpecial          SpecialChar
445 hi def link wpsTag              Statement
446 hi def link wpsArgs             Constant
447 hi def link wpsOperator         Operator
448 hi def link wpsConditional      Conditional
449 hi def link wpsIdentifier       Identifier
451 let b:current_syntax = "wps"
453 " vim:ts=4 et sts=4 sw=4: