setlocal number setlocal foldenable setlocal foldmethod=expr setlocal foldcolumn=0 " setlocal foldexpr=get(synstack(v:lnum,1),0)==hlID('cComment') setlocal foldexpr=index([0,hlID('cComment'),hlID('Comment')],get(synstack(v:lnum,1),0)) " syntax match cType "struct\s+[A-Za-z0-9_]+\>" " syn clear cStructure " highlight! link defines Special syntax match Define "\<[A-Z][A-Z0-9_]*\>" " syntax match Todo "\/\/ @[A-Z]*\:.*$" syntax keyword Todo TODO contained syntax match Comment "//.*" contains=Todo " clear default group for a cBlock so we can redefine it without the fold option syn clear cBlock syn region cBlock start=/{/ end=/}/ transparent " multiple single line comments in a row " broken! " syn region myCComment start="/\*" end="\*/" fold keepend transparent " let b:current_syntax = "c" " let g:polyglot_disabled = ['c/c++'] " unlet s:ft " let &cpo = s:cpo_save " unlet s:cpo_save