diff options
| author | Justin M. Keyes <justinkz@gmail.com> | 2018-10-29 17:47:27 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-10-29 17:47:27 +0100 |
| commit | f5406dfe7772dca82e31f27c042c5718198f0ec8 (patch) | |
| tree | 4dd3a3c82b0f4e762d36501f19a652fc6b41ee48 /runtime/syntax/c.vim | |
| parent | cf93b5e9f9eea1b08ca8d7cb124265867b2f3bf9 (diff) | |
| parent | 6d1827aebc88698b75094029fb0a9e45c1d67632 (diff) | |
| download | rneovim-f5406dfe7772dca82e31f27c042c5718198f0ec8.tar.gz rneovim-f5406dfe7772dca82e31f27c042c5718198f0ec8.tar.bz2 rneovim-f5406dfe7772dca82e31f27c042c5718198f0ec8.zip | |
Merge #9164 from justinmk/vim-a2a80162deb1
vim-patch: runtime updates
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 f659a87b71..1143ca7dd7 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") |