xref: /vim-8.2.3635/runtime/syntax/cmusrc.vim (revision 214641f7)
1" Vim syntax file
2" Previous Maintainer:  Nikolai Weibull <[email protected]>
3" Latest Revision:      2007-06-17
4
5if exists("b:current_syntax")
6  finish
7endif
8
9let s:cpo_save = &cpo
10set cpo&vim
11
12setlocal iskeyword+=-
13
14syn keyword cmusrcTodo          contained TODO FIXME XXX NOTE
15
16syn match   cmusrcComment       contained display '^\s*#.*$'
17
18syn match   cmusrcBegin         display '^'
19                                \ nextgroup=cmusrcKeyword,cmusrcComment
20                                \ skipwhite
21
22syn keyword cmusrcKeyword       contained add
23                                \ nextgroup=cmusrcAddSwitches,cmusrcURI
24                                \ skipwhite
25
26syn match   cmusrcAddSwitches   contained display '-[lpqQ]'
27                                \ nextgroup=cmusrcURI
28                                \ skipwhite
29
30syn match   cmusrcURI           contained display '.\+'
31
32syn keyword cmusrcKeyword       contained bind
33                                \ nextgroup=cmusrcBindSwitches,
34                                \           cmusrcBindContext
35                                \ skipwhite
36
37syn match   cmusrcBindSwitches  contained display '-[f]'
38                                \ nextgroup=cmusrcBindContext
39                                \ skipwhite
40
41syn keyword cmusrcBindContext   contained common library playlist queue
42                                \ browser filters
43                                \ nextgroup=cmusrcBindKey
44                                \ skipwhite
45
46syn match   cmusrcBindKey       contained display '\S\+'
47                                \ nextgroup=cmusrcKeyword
48                                \ skipwhite
49
50syn keyword cmusrcKeyword       contained browser-up colorscheme echo factivate
51                                \ filter invert player-next player-pause
52                                \ player-play player-prev player-stop quit
53                                \ refresh run search-next search-prev shuffle
54                                \ unmark win-activate win-add-l win-add-p
55                                \ win-add-Q win-add-q win-bottom win-down
56                                \ win-mv-after win-mv-before win-next
57                                \ win-page-down win-page-up win-remove
58                                \ win-sel-cur win-toggle win-top win-up
59                                \ win-update
60
61syn keyword cmusrcKeyword       contained cd
62                                \ nextgroup=cmusrcDirectory
63                                \ skipwhite
64
65syn match   cmusrcDirectory     contained display '.\+'
66
67syn keyword cmusrcKeyword       contained clear
68                                \ nextgroup=cmusrcClearSwitches
69
70syn match   cmusrcClearSwitches contained display '-[lpq]'
71
72syn keyword cmusrcKeyword       contained fset
73                                \ nextgroup=cmusrcFSetName
74                                \ skipwhite
75
76syn match   cmusrcFSetName      contained display '[^=]\+'
77                                \ nextgroup=cmusrcFSetEq
78
79syn match   cmusrcFSetEq        contained display '='
80                                \ nextgroup=cmusrcFilterExpr
81
82syn match   cmusrcFilterExpr    contained display '.\+'
83
84syn keyword cmusrcKeyword       contained load
85                                \ nextgroup=cmusrcLoadSwitches,cmusrcURI
86                                \ skipwhite
87
88syn match   cmusrcLoadSwitches  contained display '-[lp]'
89                                \ nextgroup=cmusrcURI
90                                \ skipwhite
91
92syn keyword cmusrcKeyword       contained mark
93                                \ nextgroup=cmusrcFilterExpr
94
95syn keyword cmusrcKeyword       contained save
96                                \ nextgroup=cmusrcSaveSwitches,cmusrcFile
97                                \ skipwhite
98
99syn match   cmusrcSaveSwitches  contained display '-[lp]'
100                                \ nextgroup=cmusrcFile
101                                \ skipwhite
102
103syn match   cmusrcFile          contained display '.\+'
104
105syn keyword cmusrcKeyword       contained seek
106                                \ nextgroup=cmusrcSeekOffset
107                                \ skipwhite
108
109syn match   cmusrcSeekOffset    contained display
110      \ '[+-]\=\%(\d\+[mh]\=\|\%(\%(0\=\d\|[1-5]\d\):\)\=\%(0\=\d\|[1-5]\d\):\%(0\=\d\|[1-5]\d\)\)'
111
112syn keyword cmusrcKeyword       contained set
113                                \ nextgroup=cmusrcOption
114                                \ skipwhite
115
116syn keyword cmusrcOption        contained auto_reshuffle confirm_run
117                                \ continue play_library play_sorted repeat
118                                \ show_hidden show_remaining_time shuffle
119                                \ nextgroup=cmusrcSetTest,cmusrcOptEqBoolean
120
121syn match   cmusrcSetTest       contained display '?'
122
123syn match   cmusrcOptEqBoolean  contained display '='
124                                \ nextgroup=cmusrcOptBoolean
125
126syn keyword cmusrcOptBoolean    contained true false
127
128syn keyword cmusrcOption        contained aaa_mode
129                                \ nextgroup=cmusrcOptEqAAA
130
131syn match   cmusrcOptEqAAA      contained display '='
132                                \ nextgroup=cmusrcOptAAA
133
134syn keyword cmusrcOptAAA        contained all artist album
135
136syn keyword cmusrcOption        contained buffer_seconds
137                                \ nextgroup=cmusrcOptEqNumber
138
139syn match   cmusrcOptEqNumber   contained display '='
140                                \ nextgroup=cmusrcOptNumber
141
142syn match   cmusrcOptNumber     contained display '\d\+'
143
144syn keyword cmusrcOption        contained altformat_current altformat_playlist
145                                \ altformat_title altformat_trackwin
146                                \ format_current format_playlist format_title
147                                \ format_trackwin
148                                \ nextgroup=cmusrcOptEqFormat
149
150syn match   cmusrcOptEqFormat   contained display '='
151                                \ nextgroup=cmusrcOptFormat
152
153syn match   cmusrcOptFormat     contained display '.\+'
154                                \ contains=cmusrcFormatSpecial
155
156syn match   cmusrcFormatSpecial contained display '%[0-]*\d*[alDntgydfF=%]'
157
158syn keyword cmusrcOption        contained color_cmdline_bg color_cmdline_fg
159                                \ color_error color_info color_separator
160                                \ color_statusline_bg color_statusline_fg
161                                \ color_titleline_bg color_titleline_fg
162                                \ color_win_bg color_win_cur
163                                \ color_win_cur_sel_bg color_win_cur_sel_fg
164                                \ color_win_dir color_win_fg
165                                \ color_win_inactive_cur_sel_bg
166                                \ color_win_inactive_cur_sel_fg
167                                \ color_win_inactive_sel_bg
168                                \ color_win_inactive_sel_fg
169                                \ color_win_sel_bg color_win_sel_fg
170                                \ color_win_title_bg color_win_title_fg
171                                \ nextgroup=cmusrcOptEqColor
172
173syn match   cmusrcOptEqColor    contained display '='
174                                \ nextgroup=@cmusrcOptColor
175
176syn cluster cmusrcOptColor      contains=cmusrcOptColorName,cmusrcOptColorValue
177
178syn keyword cmusrcOptColorName  contained default black red green yellow blue
179                                \ magenta cyan gray darkgray lightred lightred
180                                \ lightgreen lightyellow lightblue lightmagenta
181                                \ lightcyan white
182
183syn match   cmusrcOptColorValue contained display
184                        \ '-1\|0*\%(\d\|[1-9]\d\|1\d\d\|2\%([0-4]\d\|5[0-5]\)\)'
185
186syn keyword cmusrcOption        contained id3_default_charset output_plugin
187                                \ status_display_program
188                                \ nextgroup=cmusrcOptEqString
189
190syn match   cmusrcOption        contained
191                    \ '\%(dsp\|mixer\)\.\%(alsa\|oss\|sun\)\.\%(channel\|device\)'
192                    \ nextgroup=cmusrcOptEqString
193
194syn match   cmusrcOption        contained
195                    \ 'dsp\.ao\.\%(buffer_size\|driver\|wav_counter\|wav_dir\)'
196                    \ nextgroup=cmusrcOptEqString
197
198syn match   cmusrcOptEqString   contained display '='
199                                \ nextgroup=cmusrcOptString
200
201syn match   cmusrcOptString     contained display '.\+'
202
203syn keyword cmusrcOption        contained lib_sort pl_sort
204                                \ nextgroup=cmusrcOptEqSortKeys
205
206syn match   cmusrcOptEqSortKeys contained display '='
207                                \ nextgroup=cmusrcOptSortKeys
208
209syn keyword cmusrcOptSortKeys   contained artist album title tracknumber
210                                \ discnumber date genre filename
211                                \ nextgroup=cmusrcOptSortKeys
212                                \ skipwhite
213
214syn keyword cmusrcKeyword       contained showbind
215                                \ nextgroup=cmusrcSBindContext
216                                \ skipwhite
217
218syn keyword cmusrcSBindContext  contained common library playlist queue
219                                \ browser filters
220                                \ nextgroup=cmusrcSBindKey
221                                \ skipwhite
222
223syn match   cmusrcSBindKey      contained display '\S\+'
224
225syn keyword cmusrcKeyword       contained toggle
226                                \ nextgroup=cmusrcTogglableOpt
227                                \ skipwhite
228
229syn keyword cmusrcTogglableOpt  contained auto_reshuffle aaa_mode
230                                \ confirm_run continue play_library play_sorted
231                                \ repeat show_hidden show_remaining_time shuffle
232
233syn keyword cmusrcKeyword       contained unbind
234                                \ nextgroup=cmusrcUnbindSwitches,
235                                \           cmusrcSBindContext
236                                \ skipwhite
237
238syn match   cmusrcUnbindSwitches  contained display '-[f]'
239                                  \ nextgroup=cmusrcSBindContext
240                                  \ skipwhite
241
242syn keyword cmusrcKeyword       contained view
243                                \ nextgroup=cmusrcView
244                                \ skipwhite
245
246syn keyword cmusrcView          contained library playlist queue browser filters
247syn match   cmusrcView          contained display '[1-6]'
248
249syn keyword cmusrcKeyword       contained vol
250                                \ nextgroup=cmusrcVolume1
251                                \ skipwhite
252
253syn match   cmusrcVolume1       contained display '[+-]\=\d\+%'
254                                \ nextgroup=cmusrcVolume2
255                                \ skipwhite
256
257syn match   cmusrcVolume2       contained display '[+-]\=\d\+%'
258
259hi def link cmusrcTodo            Todo
260hi def link cmusrcComment         Comment
261hi def link cmusrcKeyword         Keyword
262hi def link cmusrcSwitches        Special
263hi def link cmusrcAddSwitches     cmusrcSwitches
264hi def link cmusrcURI             Normal
265hi def link cmusrcBindSwitches    cmusrcSwitches
266hi def link cmusrcContext         Type
267hi def link cmusrcBindContext     cmusrcContext
268hi def link cmusrcKey             String
269hi def link cmusrcBindKey         cmusrcKey
270hi def link cmusrcDirectory       Normal
271hi def link cmusrcClearSwitches   cmusrcSwitches
272hi def link cmusrcFSetName        PreProc
273hi def link cmusrcEq              Normal
274hi def link cmusrcFSetEq          cmusrcEq
275hi def link cmusrcFilterExpr      Normal
276hi def link cmusrcLoadSwitches    cmusrcSwitches
277hi def link cmusrcSaveSwitches    cmusrcSwitches
278hi def link cmusrcFile            Normal
279hi def link cmusrcSeekOffset      Number
280hi def link cmusrcOption          PreProc
281hi def link cmusrcSetTest         Normal
282hi def link cmusrcOptBoolean      Boolean
283hi def link cmusrcOptEqAAA        cmusrcEq
284hi def link cmusrcOptAAA          Identifier
285hi def link cmusrcOptEqNumber     cmusrcEq
286hi def link cmusrcOptNumber       Number
287hi def link cmusrcOptEqFormat     cmusrcEq
288hi def link cmusrcOptFormat       String
289hi def link cmusrcFormatSpecial   SpecialChar
290hi def link cmusrcOptEqColor      cmusrcEq
291hi def link cmusrcOptColor        Normal
292hi def link cmusrcOptColorName    cmusrcOptColor
293hi def link cmusrcOptColorValue   cmusrcOptColor
294hi def link cmusrcOptEqString     cmusrcEq
295hi def link cmusrcOptString       Normal
296hi def link cmusrcOptEqSortKeys   cmusrcEq
297hi def link cmusrcOptSortKeys     Identifier
298hi def link cmusrcSBindContext    cmusrcContext
299hi def link cmusrcSBindKey        cmusrcKey
300hi def link cmusrcTogglableOpt    cmusrcOption
301hi def link cmusrcUnbindSwitches  cmusrcSwitches
302hi def link cmusrcView            Normal
303hi def link cmusrcVolume1         Number
304hi def link cmusrcVolume2         Number
305
306let b:current_syntax = "cmusrc"
307
308let &cpo = s:cpo_save
309unlet s:cpo_save
310