if !exists("patch_is_c") finish endif "unlet b:current_syntax "syntax include @C syntax/c.vim "syn match Snip /^[ -+]\(++|--\)\@!.*/hs=s+1 contains=@C source ~/.vim/ftplugin/c.vim " some fixes are needed " #include, #define, etc.. Can't rely on being on the start of the line "syn region cPreCondit start="^[ -+]\s*\(%:\|#\)\s*\(if\|ifdef\|ifndef\|elif\)\>"hs=s+1 end="$" end="//"me=s-1 contains=cComment,cCppString,cCharacter,cCppParen,cParenError,cNumbers,cCommentError,cSpaceError "syn region cCppOut start="^[ -+]\s*\(%:\|#\)\s*if\s\+0\+\>"hs=s+1 end=".\@=\|$" contains=cCppOut2 "syn region cCppSkip contained start="^[ -+]\s*\(%:\|#\)\s*\(if\>\|ifdef\>\|ifndef\>\)"hs=s+1 end="^\s*\(%:\|#\)\s*endif\>" contains=cSpaceError,cCppSkip "syn match cInclude display /^[ -+]\s*\(%:\|#\)\s*include\>\s*["<]/hs=s+1 contains=cIncluded "syn region cDefine start=/^[ -+]\s*\(%:\|#\)\s*\(define\|undef\)\>/hs=s+1 end="$" keepend contains=ALLBUT,@cPreProcGroup,@Spell "syn region cPreProc start="^[ -+]\s*\(%:\|#\)\s*\(pragma\>\|line\>\|warning\>\|warn\>\|error\>\)"hs=s+1 end="$" keepend contains=ALLBUT,@cPreProcGroup,@Spell " we can't allow multi-line regions "syn region cComment start=/\/\*/ end=/\(\*\/\|$\)/ "syn region cBlock start=/{/ end=/[}]\|$/ "hi link Snip SpecialComment