omiltem.vim (1807B)
1 if exists("b:current_syntax") 2 finish 3 endif 4 5 " return break sizeof if else loop continue goto var enum struct union byte 6 " int void func 7 8 syn keyword oReturn return 9 syn keyword oBreak break 10 syn keyword oSizeof sizeof 11 syn keyword oIf if 12 syn keyword oElse else 13 syn keyword oLoop loop 14 syn keyword oContinue continue 15 syn keyword oGoto goto 16 syn keyword oVar var 17 syn keyword oEnum enum 18 syn keyword oStruct struct 19 syn keyword oUnion union 20 syn keyword oByte byte 21 syn keyword oInt int 22 syn keyword oVoid void 23 syn keyword oFunc func 24 syn keyword oAs as 25 syn keyword oType type 26 syn keyword oNil nil 27 28 syn keyword oTodo contained TODO FIXME XXX BUG 29 syn cluster oCommentGroup contains=oTodo 30 syn region oComment start="//" end="$" contains=@oCommentGroup,@Spell 31 32 syn region oString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=@Spell 33 34 syn region oChar start=+'+ skip=+\\\\\|\\'+ end=+'+ 35 36 syn match oDecInt "\<-\=\%(0\|\d\+\)\>" 37 syn match oHexInt "\<-\=0[xX]\%(\x\+\)\>" 38 syn match oBinInt "\<-\=0[bB]\%([01]\+\)\>" 39 40 syn region oBlock start="{" end="}" transparent 41 42 hi def link oDecInt Integer 43 hi def link oHexInt Integer 44 hi def link oBinInt Integer 45 hi def link Integer Number 46 47 hi def link oChar Character 48 49 hi def link oString String 50 51 hi def link oComment Comment 52 hi def link oTodo Todo 53 54 hi def link oReturn Keyword 55 hi def link oBreak Keyword 56 hi def link oSizeof Keyword 57 58 hi def link oIf Conditional 59 hi def link oElse Conditional 60 61 hi def link oLoop Repeat 62 hi def link oContinue Statement 63 hi def link oGoto Statement 64 65 hi def link oVar Keyword 66 hi def link oAs Keyword 67 hi def link oNil Keyword 68 69 hi def link oEnum Structure 70 hi def link oStruct Structure 71 hi def link oUnion Structure 72 73 hi def link oByte Type 74 hi def link oInt Type 75 hi def link oVoid Type 76 hi def link oFunc Type 77 hi def link oType Type 78 79 let b:current_syntax = "omiltem"