cmusrc.vim (12921B)
1 " Vim syntax file 2 " Previous Maintainer: Nikolai Weibull <now@bitwi.se> 3 " Latest Revision: 2007-06-17 4 5 if exists("b:current_syntax") 6 finish 7 endif 8 9 let s:cpo_save = &cpo 10 set cpo&vim 11 12 setlocal iskeyword+=- 13 14 syn keyword cmusrcTodo contained TODO FIXME XXX NOTE 15 16 syn match cmusrcComment contained display '^\s*#.*$' 17 18 syn match cmusrcBegin display '^' 19 \ nextgroup=cmusrcKeyword,cmusrcComment 20 \ skipwhite 21 22 syn keyword cmusrcKeyword contained add 23 \ nextgroup=cmusrcAddSwitches,cmusrcURI 24 \ skipwhite 25 26 syn match cmusrcAddSwitches contained display '-[lpqQ]' 27 \ nextgroup=cmusrcURI 28 \ skipwhite 29 30 syn match cmusrcURI contained display '.\+' 31 32 syn keyword cmusrcKeyword contained bind 33 \ nextgroup=cmusrcBindSwitches, 34 \ cmusrcBindContext 35 \ skipwhite 36 37 syn match cmusrcBindSwitches contained display '-[f]' 38 \ nextgroup=cmusrcBindContext 39 \ skipwhite 40 41 syn keyword cmusrcBindContext contained common library playlist queue 42 \ browser filters 43 \ nextgroup=cmusrcBindKey 44 \ skipwhite 45 46 syn match cmusrcBindKey contained display '\S\+' 47 \ nextgroup=cmusrcKeyword 48 \ skipwhite 49 50 syn 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 61 syn keyword cmusrcKeyword contained cd 62 \ nextgroup=cmusrcDirectory 63 \ skipwhite 64 65 syn match cmusrcDirectory contained display '.\+' 66 67 syn keyword cmusrcKeyword contained clear 68 \ nextgroup=cmusrcClearSwitches 69 70 syn match cmusrcClearSwitches contained display '-[lpq]' 71 72 syn keyword cmusrcKeyword contained fset 73 \ nextgroup=cmusrcFSetName 74 \ skipwhite 75 76 syn match cmusrcFSetName contained display '[^=]\+' 77 \ nextgroup=cmusrcFSetEq 78 79 syn match cmusrcFSetEq contained display '=' 80 \ nextgroup=cmusrcFilterExpr 81 82 syn match cmusrcFilterExpr contained display '.\+' 83 84 syn keyword cmusrcKeyword contained load 85 \ nextgroup=cmusrcLoadSwitches,cmusrcURI 86 \ skipwhite 87 88 syn match cmusrcLoadSwitches contained display '-[lp]' 89 \ nextgroup=cmusrcURI 90 \ skipwhite 91 92 syn keyword cmusrcKeyword contained mark 93 \ nextgroup=cmusrcFilterExpr 94 95 syn keyword cmusrcKeyword contained save 96 \ nextgroup=cmusrcSaveSwitches,cmusrcFile 97 \ skipwhite 98 99 syn match cmusrcSaveSwitches contained display '-[lp]' 100 \ nextgroup=cmusrcFile 101 \ skipwhite 102 103 syn match cmusrcFile contained display '.\+' 104 105 syn keyword cmusrcKeyword contained seek 106 \ nextgroup=cmusrcSeekOffset 107 \ skipwhite 108 109 syn match cmusrcSeekOffset contained display 110 \ '[+-]\=\%(\d\+[mh]\=\|\%(\%(0\=\d\|[1-5]\d\):\)\=\%(0\=\d\|[1-5]\d\):\%(0\=\d\|[1-5]\d\)\)' 111 112 syn keyword cmusrcKeyword contained set 113 \ nextgroup=cmusrcOption 114 \ skipwhite 115 116 syn 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 121 syn match cmusrcSetTest contained display '?' 122 123 syn match cmusrcOptEqBoolean contained display '=' 124 \ nextgroup=cmusrcOptBoolean 125 126 syn keyword cmusrcOptBoolean contained true false 127 128 syn keyword cmusrcOption contained aaa_mode 129 \ nextgroup=cmusrcOptEqAAA 130 131 syn match cmusrcOptEqAAA contained display '=' 132 \ nextgroup=cmusrcOptAAA 133 134 syn keyword cmusrcOptAAA contained all artist album 135 136 syn keyword cmusrcOption contained buffer_seconds 137 \ nextgroup=cmusrcOptEqNumber 138 139 syn match cmusrcOptEqNumber contained display '=' 140 \ nextgroup=cmusrcOptNumber 141 142 syn match cmusrcOptNumber contained display '\d\+' 143 144 syn 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 150 syn match cmusrcOptEqFormat contained display '=' 151 \ nextgroup=cmusrcOptFormat 152 153 syn match cmusrcOptFormat contained display '.\+' 154 \ contains=cmusrcFormatSpecial 155 156 syn match cmusrcFormatSpecial contained display '%[0-]*\d*[alDntgydfF=%]' 157 158 syn 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 173 syn match cmusrcOptEqColor contained display '=' 174 \ nextgroup=@cmusrcOptColor 175 176 syn cluster cmusrcOptColor contains=cmusrcOptColorName,cmusrcOptColorValue 177 178 syn 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 183 syn match cmusrcOptColorValue contained display 184 \ '-1\|0*\%(\d\|[1-9]\d\|1\d\d\|2\%([0-4]\d\|5[0-5]\)\)' 185 186 syn keyword cmusrcOption contained id3_default_charset output_plugin 187 \ status_display_program 188 \ nextgroup=cmusrcOptEqString 189 190 syn match cmusrcOption contained 191 \ '\%(dsp\|mixer\)\.\%(alsa\|oss\|sun\)\.\%(channel\|device\)' 192 \ nextgroup=cmusrcOptEqString 193 194 syn match cmusrcOption contained 195 \ 'dsp\.ao\.\%(buffer_size\|driver\|wav_counter\|wav_dir\)' 196 \ nextgroup=cmusrcOptEqString 197 198 syn match cmusrcOptEqString contained display '=' 199 \ nextgroup=cmusrcOptString 200 201 syn match cmusrcOptString contained display '.\+' 202 203 syn keyword cmusrcOption contained lib_sort pl_sort 204 \ nextgroup=cmusrcOptEqSortKeys 205 206 syn match cmusrcOptEqSortKeys contained display '=' 207 \ nextgroup=cmusrcOptSortKeys 208 209 syn keyword cmusrcOptSortKeys contained artist album title tracknumber 210 \ discnumber date genre filename 211 \ nextgroup=cmusrcOptSortKeys 212 \ skipwhite 213 214 syn keyword cmusrcKeyword contained showbind 215 \ nextgroup=cmusrcSBindContext 216 \ skipwhite 217 218 syn keyword cmusrcSBindContext contained common library playlist queue 219 \ browser filters 220 \ nextgroup=cmusrcSBindKey 221 \ skipwhite 222 223 syn match cmusrcSBindKey contained display '\S\+' 224 225 syn keyword cmusrcKeyword contained toggle 226 \ nextgroup=cmusrcTogglableOpt 227 \ skipwhite 228 229 syn keyword cmusrcTogglableOpt contained auto_reshuffle aaa_mode 230 \ confirm_run continue play_library play_sorted 231 \ repeat show_hidden show_remaining_time shuffle 232 233 syn keyword cmusrcKeyword contained unbind 234 \ nextgroup=cmusrcUnbindSwitches, 235 \ cmusrcSBindContext 236 \ skipwhite 237 238 syn match cmusrcUnbindSwitches contained display '-[f]' 239 \ nextgroup=cmusrcSBindContext 240 \ skipwhite 241 242 syn keyword cmusrcKeyword contained view 243 \ nextgroup=cmusrcView 244 \ skipwhite 245 246 syn keyword cmusrcView contained library playlist queue browser filters 247 syn match cmusrcView contained display '[1-6]' 248 249 syn keyword cmusrcKeyword contained vol 250 \ nextgroup=cmusrcVolume1 251 \ skipwhite 252 253 syn match cmusrcVolume1 contained display '[+-]\=\d\+%' 254 \ nextgroup=cmusrcVolume2 255 \ skipwhite 256 257 syn match cmusrcVolume2 contained display '[+-]\=\d\+%' 258 259 hi def link cmusrcTodo Todo 260 hi def link cmusrcComment Comment 261 hi def link cmusrcKeyword Keyword 262 hi def link cmusrcSwitches Special 263 hi def link cmusrcAddSwitches cmusrcSwitches 264 hi def link cmusrcURI Normal 265 hi def link cmusrcBindSwitches cmusrcSwitches 266 hi def link cmusrcContext Type 267 hi def link cmusrcBindContext cmusrcContext 268 hi def link cmusrcKey String 269 hi def link cmusrcBindKey cmusrcKey 270 hi def link cmusrcDirectory Normal 271 hi def link cmusrcClearSwitches cmusrcSwitches 272 hi def link cmusrcFSetName PreProc 273 hi def link cmusrcEq Normal 274 hi def link cmusrcFSetEq cmusrcEq 275 hi def link cmusrcFilterExpr Normal 276 hi def link cmusrcLoadSwitches cmusrcSwitches 277 hi def link cmusrcSaveSwitches cmusrcSwitches 278 hi def link cmusrcFile Normal 279 hi def link cmusrcSeekOffset Number 280 hi def link cmusrcOption PreProc 281 hi def link cmusrcSetTest Normal 282 hi def link cmusrcOptBoolean Boolean 283 hi def link cmusrcOptEqAAA cmusrcEq 284 hi def link cmusrcOptAAA Identifier 285 hi def link cmusrcOptEqNumber cmusrcEq 286 hi def link cmusrcOptNumber Number 287 hi def link cmusrcOptEqFormat cmusrcEq 288 hi def link cmusrcOptFormat String 289 hi def link cmusrcFormatSpecial SpecialChar 290 hi def link cmusrcOptEqColor cmusrcEq 291 hi def link cmusrcOptColor Normal 292 hi def link cmusrcOptColorName cmusrcOptColor 293 hi def link cmusrcOptColorValue cmusrcOptColor 294 hi def link cmusrcOptEqString cmusrcEq 295 hi def link cmusrcOptString Normal 296 hi def link cmusrcOptEqSortKeys cmusrcEq 297 hi def link cmusrcOptSortKeys Identifier 298 hi def link cmusrcSBindContext cmusrcContext 299 hi def link cmusrcSBindKey cmusrcKey 300 hi def link cmusrcTogglableOpt cmusrcOption 301 hi def link cmusrcUnbindSwitches cmusrcSwitches 302 hi def link cmusrcView Normal 303 hi def link cmusrcVolume1 Number 304 hi def link cmusrcVolume2 Number 305 306 let b:current_syntax = "cmusrc" 307 308 let &cpo = s:cpo_save 309 unlet s:cpo_save