diff options
author | Bram Moolenaar <Bram@vim.org> | 2018-01-28 22:47:25 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2018-01-28 22:47:25 +0100 |
commit | 40962ec9c0e7b8699e101182b06ddd39dc0e1212 (patch) | |
tree | 8949df2955a3d9cc6c0e4a6e89aa123a31c0abbd /runtime/syntax/c.vim | |
parent | 84b242c369a22b581c43de9de0152f0baedd71ab (diff) | |
download | vim-40962ec9c0e7b8699e101182b06ddd39dc0e1212.zip |
Update runtime files.
Diffstat (limited to 'runtime/syntax/c.vim')
-rw-r--r-- | runtime/syntax/c.vim | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/runtime/syntax/c.vim b/runtime/syntax/c.vim index f659a87b7..1143ca7dd 100644 --- a/runtime/syntax/c.vim +++ b/runtime/syntax/c.vim @@ -13,6 +13,14 @@ set cpo&vim let s:ft = matchstr(&ft, '^\([^.]\)\+') +" Optional embedded Autodoc parsing +" To enable it add: let g:c_autodoc = 1 +" to your .vimrc +if exists("c_autodoc") + syn include @cAutodoc <sfile>:p:h/autodoc.vim + unlet b:current_syntax +endif + " A bunch of useful C keywords syn keyword cStatement goto break return continue asm syn keyword cLabel case default @@ -377,6 +385,13 @@ syn cluster cPreProcGroup contains=cPreCondit,cIncluded,cInclude,cDefine,cErrInP syn region cDefine start="^\s*\zs\(%:\|#\)\s*\(define\|undef\)\>" skip="\\$" end="$" keepend contains=ALLBUT,@cPreProcGroup,@Spell syn region cPreProc start="^\s*\zs\(%:\|#\)\s*\(pragma\>\|line\>\|warning\>\|warn\>\|error\>\)" skip="\\$" end="$" keepend contains=ALLBUT,@cPreProcGroup,@Spell +" Optional embedded Autodoc parsing +if exists("c_autodoc") + syn match cAutodocReal display contained "\%(//\|[/ \t\v]\*\|^\*\)\@2<=!.*" contains=@cAutodoc containedin=cComment,cCommentL + syn cluster cCommentGroup add=cAutodocReal + syn cluster cPreProcGroup add=cAutodocReal +endif + " Highlight User Labels syn cluster cMultiGroup contains=cIncluded,cSpecial,cCommentSkip,cCommentString,cComment2String,@cCommentGroup,cCommentStartError,cUserCont,cUserLabel,cBitField,cOctalZero,cCppOutWrapper,cCppInWrapper,@cCppOutInGroup,cFormat,cNumber,cFloat,cOctal,cOctalError,cNumbersCom,cCppParen,cCppBracket,cCppString if s:ft ==# 'c' || exists("cpp_no_cpp11") |