Skip to content

Instantly share code, notes, and snippets.

@simonlindholm
Last active August 29, 2015 14:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save simonlindholm/070276decf94af60e698 to your computer and use it in GitHub Desktop.
Save simonlindholm/070276decf94af60e698 to your computer and use it in GitHub Desktop.
librcd syntax highlighting for vim
" Vim syntax file, modified from http://www.vim.org/scripts/script.php?script_id=3064.
" Put in ~/.vim/after/syntax/c.vim
"
" Language: Librcd C
" Maintainer: Simon Lindholm (simon.lindholm10@gmail.com)
" Last Change: 2014 Aug. 28
" Version: 0.1
"
" Changelog:
" 0.1 - initial version, modification from vimscript#3064
" operators, originally by Mikhail Wolfson <mywolfson@gmail.com>
syn match cOperator "\(<<\|>>\|[-+*/%&^|<>!=]\)="
syn match cOperator "<<\|>>\|&&\|||\|++\|--\|->"
syn match cOperator "[.!~*&%<>^|=,+-]"
syn match cOperator "/[^/*=]"me=e-1
syn match cOperator "/$"
syn match cOperator "&&\|||"
syn match cOperator "[][]"
syn match cDelimiter "[();\\]"
hi def link cDelimiter Delimiter
" foldmethod=syntax fix, originally by Ivan Freitas <ivansichfreitas@gmail.com>
syn match cBraces display "[{}]"
hi def link cBraces Delimiter
" librcd stuff
syn match cIdentifier display "\bfid(\w\+)"
syn keyword cBoolean true false
syn keyword cIdentifier rio_t rcd_fid_t sfid errno assert typeof import import_list escape escape_list NAN INFINITY
syn keyword cIdentifier join_server_params server_fiber_id rcd_self new_fid fiber_main_attr spawn_fiber spawn_static_fiber
syn keyword cIdentifier accept_join auto_accept_join server_accept_join
syn keyword cIdentifier exception_io exception_desync exception_inner_join_fail exception_arg exception_canceled exception_fatal
syn keyword cIdentifier define_eio define_eio_complex
syn keyword cType noret join_locked join_shared fstr_t fstr_mem_t uint128_t int128_t fiber_main fiber_main_t
syn keyword cRepeat dict_foreach list_foreach
syn keyword cStatement sub_heap_e new throw throw_fwd throw_fwd_same throw_em throw_em_fwd throw_eio throw_eio_fwd
syn keyword cConditional fmitosis emitosis try catch finally catch_eio uninterruptible sub_heap server_heap_flip switch_heap sub_heap_txn switch_txn global_heap
hi def link cIdentifier Identifier
hi def link cBoolean Boolean
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment