" Vim syntax file " Language: Cmod " Current Maintainer: Stephen R. van den Berg " Last Change: 2018 Jan 18 " Version: 2.2.1 " Remark: Is used to edit Cmod files for Pike development. " Remark: Includes a highlighter for any embedded Autodoc format. " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif let s:cpo_save = &cpo set cpo&vim " Read the C syntax to start with runtime! syntax/c.vim unlet b:current_syntax " For embedded Autodoc documentation syn include @cmodAutodoc :p:h/autodoc.vim unlet b:current_syntax " Supports rotating amongst several same-level preprocessor conditionals packadd! matchit let b:match_words = "({:}\\@1<=),^\s*#\s*\%(if\%(n\?def\)\|else\|el\%(se\)\?if\|endif\)\>" " Cmod extensions syn keyword cmodStatement __INIT INIT EXIT GC_RECURSE GC_CHECK syn keyword cmodStatement EXTRA OPTIMIZE RETURN syn keyword cmodStatement ADD_EFUN ADD_EFUN2 ADD_FUNCTION syn keyword cmodStatement MK_STRING MK_STRING_SVALUE CONSTANT_STRLEN syn keyword cmodAccess public protected private INHERIT syn keyword cmodAccess CTYPE CVAR PIKEVAR PIKEFUN syn keyword cmodModifier efun export flags optflags optfunc syn keyword cmodModifier type rawtype errname name c_name prototype syn keyword cmodModifier program_flags gc_trivial syn keyword cmodType bool mapping string multiset array mixed syn keyword cmodType object function program auto syn keyword cmodType bignum longest zero syn keyword cmodType this this_program syn keyword cmodOperator _destruct create __hash _sizeof _indices _values syn keyword cmodOperator _is_type _sprintf _equal _m_delete _get_iterator syn keyword cmodOperator _search _types _serialize _deserialize syn keyword cmodOperator _size_object _random _sqrt syn keyword cmodStructure DECLARATIONS PIKECLASS DECLARE_STORAGE syn match cmodAutodocReal display contained "!.*" contains=@cmodAutodoc containedin=cComment,cCommentL syn cluster cCommentGroup add=cmodAutodocReal syn cluster cPreProcGroup add=cmodAutodocReal " Default highlighting hi def link cmodAccess Statement hi def link cmodOperator Operator hi def link cmodStatement Statement hi def link cmodModifier Type hi def link cmodType Type hi def link cmodStorageClass StorageClass hi def link cmodStructure Structure let b:current_syntax = "cmod" let &cpo = s:cpo_save unlet s:cpo_save " vim: ts=8