Created
January 7, 2011 21:03
-
-
Save imasahiro/770093 to your computer and use it in GitHub Desktop.
konha-mode.vim
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" Vim syntax file | |
" Language: Konoha | |
" Maintainer: Masahiro Ide <[email protected]> | |
" URL: http://sourceforge.jp/projects/konoha/ | |
" Last Change: 2009 July 09 | |
" Quit when a syntax file was already loaded | |
if version < 600 | |
syntax clear | |
elseif exists("b:current_syntax") | |
finish | |
endif | |
syn region kParen transparent start='(' end=')' contains=ALLBUT, kError,kTodo | |
syn match kError ")" | |
"syn match kError "}" | |
syn match kError "¥<¥%(catch¥|finally¥|else¥|from¥)¥>" | |
syn match kOperatorError display +::+ | |
syn match kLabel display +^¥s*¥I¥i*¥s*:¥([^:]¥)¥@=+ | |
syn keyword kTodo contained TODO FIXME XXX | |
syn keyword kType int Int char short long float double Float | |
syn keyword kType Bytes String string | |
syn keyword kType bool boolean void Any var | |
syn keyword kType Array DictMap DictSet HashMap HashSet | |
"syn keyword kType | |
syn keyword kStorage class extends interface this final protected private public | |
syn keyword kConstant false null true | |
syn keyword kStatement as default from is isa lock namespace pragma where | |
syn keyword kFunc print typeof defined using import typeof assert format new | |
syn keyword kException try catch finally throw | |
syn keyword kRepeat break continue do for foreach goto return while | |
syn keyword kCond else if switch | |
syn keyword kTodo contained TODO FIXME XXX NOTE | |
syn region kComment start="/¥*" end="¥*/" contains=kTodo,@Spell | |
syn match kComment "¥%^#!.*" contains=kTodo,@Spell | |
syn match kComment "//.*$" contains=kTodo,@Spell | |
" Strings and constants | |
syn match kSpecialError contained "¥¥." | |
" ? | |
" syn match kSpecialCharError contained "[^']" | |
syn match kVerbatimSpec +@"+he=s+1 contained | |
syn region kVerbatimString start=+@"+ end=+"+ end=+$+ skip=+""+ contains=kVerbatimSpec,@Spell | |
syn region kString start=+"+ end=+"+ end=+$+ contains=kSpecialChar,kSpecialError,@Spell | |
syn region kString start=+'+ end=+'+ contains=kSpecialChar,@Spell | |
syn region kString start=+[uU]¥="""+ end=+"""+ contains=kSpecialChar,@Spell | |
syn region kString start=+[uU]¥='''+ end=+'''+ contains=kSpecialChar,@Spell | |
syn match kCharacter "'[^']*'" contains=kSpecialChar,kSpecialCharError | |
syn match kCharacter "'¥¥''" contains=kSpecialChar | |
syn match kCharacter "'[^¥¥]'" | |
syn match kNumber "¥<¥d¥+¥>" | |
syn match kNumber "¥(¥<¥d¥+¥.¥d*¥|¥.¥d¥+¥)¥([eE][-+]¥=¥d¥+¥)¥=[fFdD]¥=" | |
" HiLink luaStatement Statement | |
hi def link kStorage StorageClass | |
hi def link kRepeat Repeat | |
hi def link kVerbatimString String | |
hi def link kString String | |
hi def link kNumber Number | |
hi def link kLabel Label | |
" HiLink luaFloat Float | |
" HiLink luaOperator Operator | |
" HiLink luaConstant Constant | |
hi def link kCond Conditional | |
" HiLink luaFunction Function | |
hi def link kComment Comment | |
hi def link kType Type | |
hi def link kTodo Todo | |
" HiLink luaTable Structure | |
hi def link kError Error | |
hi def link kOperatorError Error | |
" HiLink luaSpecial SpecialChar | |
hi def link kFunc Function | |
hi def link kConstant Constant | |
hi def link kException Exception | |
let b:current_syntax = "konoha" | |
" vim: ts=8 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment