1" Vim syntax file 2" Language: kscript 3" Maintainer: Thomas Capricelli <orzel@yalbi.com> 4" URL: http://aquila.rezel.enst.fr/thomas/vim/kscript.vim 5" CVS: $Id: kscript.vim,v 1.1 2004/06/13 17:40:02 vimboss Exp $ 6 7" For version 5.x: Clear all syntax items 8" For version 6.x: Quit when a syntax file was already loaded 9if version < 600 10 syntax clear 11elseif exists("b:current_syntax") 12 finish 13endif 14 15syn keyword kscriptPreCondit import from 16 17syn keyword kscriptHardCoded print println connect length arg mid upper lower isEmpty toInt toFloat findApplication 18syn keyword kscriptConditional if else switch 19syn keyword kscriptRepeat while for do foreach 20syn keyword kscriptExceptions emit catch raise try signal 21syn keyword kscriptFunction class struct enum 22syn keyword kscriptConst FALSE TRUE false true 23syn keyword kscriptStatement return delete 24syn keyword kscriptLabel case default 25syn keyword kscriptStorageClass const 26syn keyword kscriptType in out inout var 27 28syn keyword kscriptTodo contained TODO FIXME XXX 29 30syn region kscriptComment start="/\*" end="\*/" contains=kscriptTodo 31syn match kscriptComment "//.*" contains=kscriptTodo 32syn match kscriptComment "#.*$" contains=kscriptTodo 33 34syn region kscriptString start=+'+ end=+'+ skip=+\\\\\|\\'+ 35syn region kscriptString start=+"+ end=+"+ skip=+\\\\\|\\"+ 36syn region kscriptString start=+"""+ end=+"""+ 37syn region kscriptString start=+'''+ end=+'''+ 38 39" Define the default highlighting. 40" For version 5.7 and earlier: only when not done already 41" For version 5.8 and later: only when an item doesn't have highlighting yet 42if version >= 508 || !exists("did_kscript_syntax_inits") 43 if version < 508 44 let did_kscript_syntax_inits = 1 45 command -nargs=+ HiLink hi link <args> 46 else 47 command -nargs=+ HiLink hi def link <args> 48 endif 49 50 HiLink kscriptConditional Conditional 51 HiLink kscriptRepeat Repeat 52 HiLink kscriptExceptions Statement 53 HiLink kscriptFunction Function 54 HiLink kscriptConst Constant 55 HiLink kscriptStatement Statement 56 HiLink kscriptLabel Label 57 HiLink kscriptStorageClass StorageClass 58 HiLink kscriptType Type 59 HiLink kscriptTodo Todo 60 HiLink kscriptComment Comment 61 HiLink kscriptString String 62 HiLink kscriptPreCondit PreCondit 63 HiLink kscriptHardCoded Statement 64 65 delcommand HiLink 66endif 67 68let b:current_syntax = "kscript" 69 70" vim: ts=8 71