Skip to content

Instantly share code, notes, and snippets.

@zonque
Created September 10, 2012 08:25
Show Gist options
  • Save zonque/3689644 to your computer and use it in GitHub Desktop.
Save zonque/3689644 to your computer and use it in GitHub Desktop.
DTS syntax highlighting for VIM
if exists("b:current_syntax")
finish
endif
syntax region dtsComment start="/\*" end="\*/"
syntax match dtsReference "&[[:alpha:][:digit:]_]\+"
syntax region dtsBinaryProperty start="\[" end="\]"
syntax match dtsStringProperty "\".*\""
syntax match dtsKeyword "/.*/"
syntax match dtsLabel "^[[:space:]]*[[:alpha:][:digit:]_]\+:"
syntax region dtsCellProperty start="<" end=">" contains=dtsReference,dtsBinaryProperty,dtsStringProperty,dtsComment
syntax region dtsCommentInner start="/\*" end="\*/"
hi def link dtsCellProperty Number
hi def link dtsBinaryProperty Number
hi def link dtsStringProperty String
hi def link dtsKeyword Include
hi def link dtsLabel Label
hi def link dtsReference Macro
hi def link dtsComment Comment
hi def link dtsCommentInner Comment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment