markdown.vim (1762B)
1 syn match markdownError "\w\@<=\w\@=" 2 syn match markdownCite "\[@\w\+\]" contains=@NoSpell 3 syn match markdownCiteInline "@\w\+\( \[[^\]]\+\]\)*" contains=@NoSpell 4 syn match markdownLatex "\\[a-z0-9]\+{\?.*}\?" contains=@NoSpell 5 syn region markdownMathInline start="\(\\\)\@<!\$\(\$\)\@!" end="\$" contains=@NoSpell 6 syn region markdownMathBlock start="\$\$" end="\$\$" contains=@NoSpell 7 syn region markdownComment start="<!--" end="-->" contains=@NoSpell,Todo 8 syn region markdownAbbrev start="\*\[" end="$" 9 syn keyword Todo FIXME TODO contained 10 11 unlet! b:current_syntax 12 syntax include @YAML syntax/yaml.vim 13 " Deciding to only keep yaml blocks at start of buffer, otherwise <hr> would be counted as start of yaml 14 " syn region markdownYaml matchgroup=SpecialComment keepend start="\(\%^\|^\s*\)---$" end="^\(-\|\.\)\{3\}$" contains=@YAML 15 syn region markdownYaml matchgroup=SpecialComment keepend start="\%^---$" end="^\(-\|\.\)\{3\}$" contains=@YAML 16 unlet! b:current_syntax 17 syntax include @Conf syntax/conf.vim 18 syn region markdownRust matchgroup=SpecialComment keepend start="\%^+++$" end="^+++$" contains=@Conf 19 let b:current_syntax = 'markdown' 20 21 hi def link markdownMathInline Special 22 hi def link markdownMathBlock Special 23 hi def link markdownComment Comment 24 hi def link markdownYaml SpecialComment 25 hi def link markdownAbbrev Define 26 hi def link markdownCite Comment 27 hi def link markdownCiteInline Comment 28 hi def link markdownLatex Identifier 29 30 if has('conceal') 31 setl conceallevel=2 " Use concealchar and highlight with Conceal group 32 syn match concealOperator "<=" conceal cchar=≤ 33 syn match concealOperator ">=" conceal cchar=≥ 34 syn keyword concealKeyword lambda conceal cchar=λ 35 hi! link concealOperator Conceal 36 hi! link concealKeyword Conceal 37 endif