Created
May 7, 2015 22:19
-
-
Save aisamanra/9df3daaeb1fa16edd45c to your computer and use it in GitHub Desktop.
unfinished gidl mode for 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: GIDL | |
" Last Change: 2014 April 17 | |
" Maintainer: Getty Ritter <[email protected]> | |
if version < 600 | |
syntax clear | |
elseif exists("b:current_syntax") | |
finish | |
endif | |
let s:cpo_save = &cpo | |
set cpo&vim | |
syn keyword gidlSyntax def-enum def-struct def-newtype def-interface | |
syn keyword gidlType uint8_t uint16_t uint32_t uint64_t | |
syn keyword gidlType sint8_t sint16_t sint32_t sint64_t | |
syn keyword gidlType bool_t float_t double_t | |
syn match gidlDelimiter !\.[ \t\[\]()";]!me=e-1 | |
" Non-quoted lists, and strings: | |
syn region gidlStruc matchgroup=Delimiter start="(" matchgroup=Delimiter end=")" contains=ALL | |
syn match gidlComment ";.*$" contains=@Spell | |
syn match gidlNumber "[-+](#[XxOo])?[0-9A-Fa-f]+" | |
" Synchronization and the wrapping up... | |
syn sync match matchPlace grouphere NONE "^[^ \t]" | |
" ... i.e. synchronize on a line that starts at the left margin | |
" Define the default highlighting. | |
" For version 5.7 and earlier: only when not done already | |
" For version 5.8 and later: only when an item doesn't have highlighting yet | |
if version >= 508 || !exists("did_gidl_syntax_inits") | |
if version < 508 | |
let did_gidl_syntax_inits = 1 | |
command -nargs=+ HiLink hi link <args> | |
else | |
command -nargs=+ HiLink hi def link <args> | |
endif | |
HiLink gidlSyntax Statement | |
HiLink gidlType Constant | |
HiLink gidlComment Comment | |
HiLink gidlNumber Number | |
HiLink gidlDelimiter Delimiter | |
HiLink gidlComment Comment | |
delcommand HiLink | |
endif | |
let b:current_syntax = "gidl" | |
let &cpo = s:cpo_save | |
unlet s:cpo_save |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment