Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 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 |
Bram Moolenaar | 5c73622 | 2010-01-06 20:54:52 +0100 | [diff] [blame] | 5 | " CVS: $Id: kscript.vim,v 1.1 2004/06/13 17:40:02 vimboss Exp $ |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 6 | |
Bram Moolenaar | 89bcfda | 2016-08-30 23:26:57 +0200 | [diff] [blame] | 7 | " quit when a syntax file was already loaded |
| 8 | if exists("b:current_syntax") |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 9 | finish |
| 10 | endif |
| 11 | |
| 12 | syn keyword kscriptPreCondit import from |
| 13 | |
| 14 | syn keyword kscriptHardCoded print println connect length arg mid upper lower isEmpty toInt toFloat findApplication |
| 15 | syn keyword kscriptConditional if else switch |
| 16 | syn keyword kscriptRepeat while for do foreach |
| 17 | syn keyword kscriptExceptions emit catch raise try signal |
| 18 | syn keyword kscriptFunction class struct enum |
| 19 | syn keyword kscriptConst FALSE TRUE false true |
| 20 | syn keyword kscriptStatement return delete |
| 21 | syn keyword kscriptLabel case default |
| 22 | syn keyword kscriptStorageClass const |
| 23 | syn keyword kscriptType in out inout var |
| 24 | |
| 25 | syn keyword kscriptTodo contained TODO FIXME XXX |
| 26 | |
| 27 | syn region kscriptComment start="/\*" end="\*/" contains=kscriptTodo |
| 28 | syn match kscriptComment "//.*" contains=kscriptTodo |
| 29 | syn match kscriptComment "#.*$" contains=kscriptTodo |
| 30 | |
| 31 | syn region kscriptString start=+'+ end=+'+ skip=+\\\\\|\\'+ |
| 32 | syn region kscriptString start=+"+ end=+"+ skip=+\\\\\|\\"+ |
| 33 | syn region kscriptString start=+"""+ end=+"""+ |
| 34 | syn region kscriptString start=+'''+ end=+'''+ |
| 35 | |
| 36 | " Define the default highlighting. |
Bram Moolenaar | 89bcfda | 2016-08-30 23:26:57 +0200 | [diff] [blame] | 37 | " Only when an item doesn't have highlighting yet |
| 38 | command -nargs=+ HiLink hi def link <args> |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 39 | |
Bram Moolenaar | 89bcfda | 2016-08-30 23:26:57 +0200 | [diff] [blame] | 40 | HiLink kscriptConditional Conditional |
| 41 | HiLink kscriptRepeat Repeat |
| 42 | HiLink kscriptExceptions Statement |
| 43 | HiLink kscriptFunction Function |
| 44 | HiLink kscriptConst Constant |
| 45 | HiLink kscriptStatement Statement |
| 46 | HiLink kscriptLabel Label |
| 47 | HiLink kscriptStorageClass StorageClass |
| 48 | HiLink kscriptType Type |
| 49 | HiLink kscriptTodo Todo |
| 50 | HiLink kscriptComment Comment |
| 51 | HiLink kscriptString String |
| 52 | HiLink kscriptPreCondit PreCondit |
| 53 | HiLink kscriptHardCoded Statement |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 54 | |
Bram Moolenaar | 89bcfda | 2016-08-30 23:26:57 +0200 | [diff] [blame] | 55 | delcommand HiLink |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 56 | |
| 57 | let b:current_syntax = "kscript" |
| 58 | |
| 59 | " vim: ts=8 |