diff runtime/syntax/c.vim @ 13125:371ceeebbdaa

Update runtime files. commit https://github.com/vim/vim/commit/40962ec9c0e7b8699e101182b06ddd39dc0e1212 Author: Bram Moolenaar <Bram@vim.org> Date: Sun Jan 28 22:47:25 2018 +0100 Update runtime files.
author Christian Brabandt <cb@256bit.org>
date Sun, 28 Jan 2018 23:00:08 +0100
parents d183d629509e
children 40ef13331e02
line wrap: on
line diff
--- 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=cPreC
 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")