framescript.vim (11679B)
1 " Vim syntax file 2 " Language: FrameScript v4.0 3 " Previous Maintainer: Nikolai Weibull <now@bitwi.se> 4 " Latest Revision: 2007-02-22 5 6 if exists("b:current_syntax") 7 finish 8 endif 9 10 let s:cpo_save = &cpo 11 set cpo&vim 12 13 syn match framescriptOperator 14 \ '[+*/%=-]\|[><]=\=\|#[&|]' 15 16 syn keyword framescriptTodo 17 \ contained 18 \ TODO FIXME XXX NOTE 19 20 syn cluster framescriptCommentGroup 21 \ contains= 22 \ framescriptTodo, 23 \ @Spell 24 25 syn match framescriptComment 26 \ display 27 \ contains=@framescriptCommentGroup 28 \ '//.*$' 29 30 syn region framescriptComment 31 \ contains=@framescriptCommentGroup 32 \ matchgroup=framescriptCommentStart 33 \ start='/\*' 34 \ end='\*/' 35 36 syn case ignore 37 38 syn match framescriptInclude 39 \ display 40 \ contains=framescriptIncluded 41 \ "^\s*<#Include\>\s*'" 42 43 syn region framescriptIncluded 44 \ contained 45 \ display 46 \ start=+'+ 47 \ skip=+\\\\\|\\'+ 48 \ end=+'+ 49 50 syn match framescriptNumbers 51 \ display 52 \ transparent 53 \ contains= 54 \ framescriptInteger, 55 \ framescriptReal, 56 \ framescriptMetric, 57 \ framescriptCharacter 58 \ '\<\d\|\.\d' 59 60 syn keyword framescriptBoolean 61 \ True False 62 63 syn match framescriptInteger 64 \ contained 65 \ display 66 \ '\d\+\>' 67 68 syn match framescriptInteger 69 \ contained 70 \ display 71 \ '\x\+H\>' 72 73 syn match framescriptInteger 74 \ contained 75 \ display 76 \ '[01]\+B\>' 77 78 syn match framescriptReal 79 \ contained 80 \ display 81 \ '\d\+\.\d*\|\.\d\+\>' 82 83 syn match framescriptMetric 84 \ contained 85 \ display 86 \ '\%(\d\+\%(\.\d*\)\=\|\.\d\+\)\%(pts\|in\|"\|cm\|mm\|pica\)\>' 87 88 syn match framescriptCharacter 89 \ contained 90 \ display 91 \ '\d\+S\>' 92 93 syn region framescriptString 94 \ contains=framescriptStringSpecialChar,@Spell 95 \ start=+'+ 96 \ skip=+\\\\\|\\'+ 97 \ end=+'+ 98 99 syn match framescriptStringSpecialChar 100 \ contained 101 \ display 102 \ "\\[\\']" 103 104 syn keyword framescriptConstant 105 \ BackSlash 106 \ CharCR 107 \ CharLF 108 \ CharTAB 109 \ ClientDir 110 \ ClientName 111 \ FslVersionMajor 112 \ FslVersionMinor 113 \ InstallName 114 \ InstalledScriptList 115 \ MainScript 116 \ NULL 117 \ ObjEndOffset 118 \ ProductRevision 119 \ Quote 120 \ ThisScript 121 122 syn keyword framescriptOperator 123 \ not 124 \ and 125 \ or 126 127 syn keyword framescriptSessionVariables 128 \ ErrorCode 129 \ ErrorMsg 130 \ DeclareVarMode 131 \ PlatformEncodingMode 132 133 syn keyword framescriptStructure 134 \ Event 135 \ EndEvent 136 137 syn keyword framescriptStatement 138 \ Sub 139 \ EndSub 140 \ Run 141 \ Function 142 \ EndFunction 143 \ Set 144 \ Add 145 \ Apply 146 \ CallClient 147 \ Close 148 \ Copy 149 \ Cut 150 \ DialogBox 151 \ Delete 152 \ Demote 153 \ Display 154 \ DocCompare 155 \ Export 156 \ Find 157 \ LeaveLoop 158 \ LeaveScript 159 \ LeaveSub 160 \ LoopNext 161 \ Merge 162 \ MsgBox 163 \ Paste 164 \ PopClipboard 165 \ PushClipboard 166 \ Read 167 \ Replace 168 \ Return 169 \ Sort 170 \ Split 171 172 syn keyword framescriptStatement 173 \ nextgroup=framescriptApplySubStatement skipwhite skipempty 174 \ Apply 175 176 syn keyword framescriptApplySubStatement 177 \ contained 178 \ Pagelayout 179 \ TextProperties 180 181 syn keyword framescriptStatement 182 \ nextgroup=framescriptClearSubStatement skipwhite skipempty 183 \ Clear 184 185 syn keyword framescriptClearSubStatement 186 \ contained 187 \ ChangeBars 188 \ Text 189 190 syn keyword framescriptStatement 191 \ nextgroup=framescriptCloseSubStatement skipwhite skipempty 192 \ Close 193 194 syn keyword framescriptCloseSubStatement 195 \ contained 196 \ Book 197 \ Document 198 \ TextFile 199 200 syn keyword framescriptStatement 201 \ nextgroup=framescriptExecSubStatement skipwhite skipempty 202 \ Exec 203 204 syn keyword framescriptExecSubStatement 205 \ contained 206 \ Compile 207 \ Script 208 \ Wait 209 210 syn keyword framescriptStatement 211 \ nextgroup=framescriptExecuteSubStatement skipwhite skipempty 212 \ Execute 213 214 syn keyword framescriptExecuteSubStatement 215 \ contained 216 \ FrameCommand 217 \ Hypertext 218 \ StartUndoCheckPoint 219 \ EndUndoCheckPoint 220 \ ClearUndoHistory 221 222 syn keyword framescriptStatement 223 \ nextgroup=framescriptGenerateSubStatement skipwhite skipempty 224 \ Generate 225 226 syn keyword framescriptGenerateSubStatement 227 \ contained 228 \ Bookfile 229 230 syn keyword framescriptStatement 231 \ nextgroup=framescriptGetSubStatement skipwhite skipempty 232 \ Get 233 234 syn keyword framescriptGetSubStatement 235 \ contained 236 \ Member 237 \ Object 238 \ String 239 \ TextList 240 \ TextProperties 241 242 syn keyword framescriptStatement 243 \ nextgroup=framescriptImportSubStatement skipwhite skipempty 244 \ Import 245 246 syn keyword framescriptImportSubStatement 247 \ contained 248 \ File 249 \ Formats 250 \ ElementDefs 251 252 syn keyword framescriptStatement 253 \ nextgroup=framescriptInstallSubStatement skipwhite skipempty 254 \ Install 255 \ Uninstall 256 257 syn keyword framescriptInstallSubStatement 258 \ contained 259 \ ChangeBars 260 \ Text 261 262 syn keyword framescriptStatement 263 \ nextgroup=framescriptNewSubStatement skipwhite skipempty 264 \ New 265 266 syn keyword framescriptNewSubStatement 267 \ contained 268 \ AFrame 269 \ Footnote 270 \ Marker 271 \ TiApiClient 272 \ Variable 273 \ XRef 274 \ FormatChangeList 275 \ FormatRule 276 \ FmtRuleClause 277 \ Arc 278 \ Ellipse 279 \ Flow 280 \ Group 281 \ Inset 282 \ Line 283 \ Math 284 \ Polygon 285 \ Polyline 286 \ Rectangle 287 \ RoundRect 288 \ TextFrame 289 \ Textline 290 \ UnanchoredFrame 291 \ Command 292 \ Menu 293 \ MenuItemSeparator 294 \ Book 295 \ CharacterFormat 296 \ Color 297 \ ConditionFormat 298 \ ElementDef 299 \ FormatChangeList 300 \ MarkerType 301 \ MasterPage 302 \ ParagraphFormat 303 \ PgfFmt 304 \ ReferencePAge 305 \ RulingFormat 306 \ TableFormat 307 \ VariableFormat 308 \ XRefFormat 309 \ BodyPage 310 \ BookComponent 311 \ Paragraph 312 \ Element 313 \ Attribute 314 \ AttributeDef 315 \ AttributeList 316 \ AttributeDefList 317 \ ElementLoc 318 \ ElementRange 319 \ Table 320 \ TableRows 321 \ TableCols 322 \ Text 323 \ Integer 324 \ Real 325 \ Metric 326 \ String 327 \ Object 328 \ TextLoc 329 \ TextRange 330 \ IntList 331 \ UIntList 332 \ MetricList 333 \ StringList 334 \ PointList 335 \ TabList 336 \ PropertyList 337 \ LibVar 338 \ ScriptVar 339 \ SubVar 340 \ TextFile 341 342 syn keyword framescriptStatement 343 \ nextgroup=framescriptOpenSubStatement skipwhite skipempty 344 \ Open 345 346 syn keyword framescriptOpenSubStatement 347 \ contained 348 \ Document 349 \ Book 350 \ TextFile 351 352 syn keyword framescriptStatement 353 \ nextgroup=framescriptPrintSubStatement skipwhite skipempty 354 \ Print 355 356 syn keyword framescriptPrintSubStatement 357 \ contained 358 \ Document 359 \ Book 360 361 syn keyword framescriptStatement 362 \ nextgroup=framescriptQuitSubStatement skipwhite skipempty 363 \ Quit 364 365 syn keyword framescriptQuitSubStatement 366 \ contained 367 \ Session 368 369 syn keyword framescriptStatement 370 \ nextgroup=framescriptRemoveSubStatement skipwhite skipempty 371 \ Remove 372 373 syn keyword framescriptRemoveSubStatement 374 \ contained 375 \ Attribute 376 \ CommandObject 377 378 syn keyword framescriptStatement 379 \ nextgroup=framescriptSaveSubStatement skipwhite skipempty 380 \ Save 381 382 syn keyword framescriptSaveSubStatement 383 \ contained 384 \ Document 385 \ Book 386 387 syn keyword framescriptStatement 388 \ nextgroup=framescriptSelectSubStatement skipwhite skipempty 389 \ Select 390 391 syn keyword framescriptSelectSubStatement 392 \ contained 393 \ TableCells 394 395 syn keyword framescriptStatement 396 \ nextgroup=framescriptStraddleSubStatement skipwhite skipempty 397 \ Straddle 398 399 syn keyword framescriptStraddleSubStatement 400 \ contained 401 \ TableCells 402 403 syn keyword framescriptStatement 404 \ nextgroup=framescriptUpdateSubStatement skipwhite skipempty 405 \ Update 406 407 syn keyword framescriptUpdateSubStatement 408 \ contained 409 \ ReDisplay 410 \ Formatting 411 \ Hyphenating 412 \ ResetEquationsSettings 413 \ ResetRefFrames 414 \ RestartPgfNums 415 \ TextInset 416 \ Variables 417 \ XRefs 418 \ Book 419 420 syn keyword framescriptStatement 421 \ nextgroup=framescriptWriteSubStatement skipwhite skipempty 422 \ Write 423 424 syn keyword framescriptUpdateSubStatement 425 \ contained 426 \ Console 427 \ Display 428 429 syn keyword framescriptRepeat 430 \ Loop 431 \ EndLoop 432 433 syn keyword framescriptConditional 434 \ If 435 \ ElseIf 436 \ Else 437 \ EndIf 438 439 syn keyword framescriptType 440 \ Local 441 \ GlobalVar 442 443 let b:framescript_minlines = exists("framescript_minlines") 444 \ ? framescript_minlines : 15 445 exec "syn sync ccomment framescriptComment minlines=" . b:framescript_minlines 446 447 hi def link framescriptTodo Todo 448 hi def link framescriptComment Comment 449 hi def link framescriptCommentStart framescriptComment 450 hi def link framescriptInclude Include 451 hi def link framescriptIncluded String 452 hi def link framescriptBoolean Boolean 453 hi def link framescriptNumber Number 454 hi def link framescriptInteger framescriptNumber 455 hi def link framescriptReal framescriptNumber 456 hi def link framescriptMetric framescriptNumber 457 hi def link framescriptCharacter framescriptNumber 458 hi def link framescriptString String 459 hi def link framescriptStringSpecialChar SpecialChar 460 hi def link framescriptConstant Constant 461 hi def link framescriptOperator None 462 hi def link framescriptSessionVariables PreProc 463 hi def link framescriptStructure Structure 464 hi def link framescriptStatement Statement 465 hi def link framescriptSubStatement Type 466 hi def link framescriptApplySubStatement framescriptSubStatement 467 hi def link framescriptClearSubStatement framescriptSubStatement 468 hi def link framescriptCloseSubStatement framescriptSubStatement 469 hi def link framescriptExecSubStatement framescriptSubStatement 470 hi def link framescriptExecuteSubStatement framescriptSubStatement 471 hi def link framescriptGenerateSubStatement framescriptSubStatement 472 hi def link framescriptGetSubStatement framescriptSubStatement 473 hi def link framescriptImportSubStatement framescriptSubStatement 474 hi def link framescriptInstallSubStatement framescriptSubStatement 475 hi def link framescriptNewSubStatement framescriptSubStatement 476 hi def link framescriptOpenSubStatement framescriptSubStatement 477 hi def link framescriptPrintSubStatement framescriptSubStatement 478 hi def link framescriptQuitSubStatement framescriptSubStatement 479 hi def link framescriptRemoveSubStatement framescriptSubStatement 480 hi def link framescriptSaveSubStatement framescriptSubStatement 481 hi def link framescriptSelectSubStatement framescriptSubStatement 482 hi def link framescriptStraddleSubStatement framescriptSubStatement 483 hi def link framescriptUpdateSubStatement framescriptSubStatement 484 hi def link framescriptRepeat Repeat 485 hi def link framescriptConditional Conditional 486 hi def link framescriptType Type 487 488 let b:current_syntax = "framescript" 489 490 let &cpo = s:cpo_save 491 unlet s:cpo_save