Skip to content

Instantly share code, notes, and snippets.

@kestred
Created February 13, 2014 07:54
Show Gist options
  • Save kestred/8971416 to your computer and use it in GitHub Desktop.
Save kestred/8971416 to your computer and use it in GitHub Desktop.
" Vim syntax file
" Language: DC File
" Maintainer: Kevin Stenerson
" Latest Revision: 12 February 2014
if exists("b:current_syntax")
finish
endif
" Keywords
syn keyword editorHighlight contained TODO FIXME NOTE
syn keyword classKeywords struct dclass
syn keyword typedefKeyword typedef
syn keyword controlKeywords import from export
syn keyword builtinTypes int8 int16 int32 int64
syn keyword builtinTypes uint8 uint16 uint32 uint64
syn keyword builtinTypes float32 float64 char string blob
syn keyword commonKeywords airecv clrecv clsend ownrecv ownsend broadcast
syn keyword commonKeywords db ram required disk
syn keyword commonKeywords static shared const
" Matches
syn match lineComment '//.*' contains=editorHighlight
syn match numeric '\d\+' contained
syn match hexConstant '<\d\+>' contained
syn match string '".\{-}"' contained
" Regions
syn region curlyBlock start="{" end="}" fold transparent
syn region parenBlock start="(" end=")" transparent contains=numeric,hexConstant,builtinTypes,string
syn region blockComment start="/\*" end="\*/" contains=editorHighlight
syn region arrayBlock start="\[" end="\]" contains=numeric
let b:current_syntax = "dcf"
hi def link editorHighlight Todo
hi def link classKeywords Type
hi def link typedefKeyword Type
hi def link typedefType Type
hi def link builtinTypes Type
hi def link controlKeywords PreProc
hi def link commonKeywords Statement
hi def link hexConstant Constant
hi def link numeric Constant
hi def link lineComment Comment
hi def link blockComment Comment
hi def link string String
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment