commit 549140a524fa8b2316a95e8cdaa06a49cd06273e parent 92a2839f124fc608b9eb9d42d7bdbbd86a4a18c2 Author: Alex Balgavy <a.balgavy@gmail.com> Date: Tue, 14 Apr 2020 22:46:46 +0200 vim: modified markdown syntax Former-commit-id: 477ca59b86dbf7f56689cb50f7cbe6b7acac7bee Diffstat:
M | vim/after/syntax/markdown.vim | | | 6 | +++++- |
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/vim/after/syntax/markdown.vim b/vim/after/syntax/markdown.vim @@ -1,11 +1,14 @@ syn match markdownError "\w\@<=\w\@=" +syn match markdownCite "\[@\w\+\]" contains=@NoSpell syn region markdownMathInline start="\(\\\)\@<!\$\(\$\)\@!" end="\$" contains=@NoSpell syn region markdownMathBlock start="\$\$" end="\$\$" contains=@NoSpell syn region markdownComment start="<!--" end="-->" contains=@NoSpell unlet b:current_syntax syntax include @YAML syntax/yaml.vim -syn region markdownYaml matchgroup=SpecialComment keepend start="\(\%^\|^\s*\)---$" end="^\(-\|\.\)\{3\}$" contains=@YAML +" Deciding to only keep yaml blocks at start of buffer, otherwise <hr> would be counted as start of yaml +" syn region markdownYaml matchgroup=SpecialComment keepend start="\(\%^\|^\s*\)---$" end="^\(-\|\.\)\{3\}$" contains=@YAML +syn region markdownYaml matchgroup=SpecialComment keepend start="\%^---$" end="^\(-\|\.\)\{3\}$" contains=@YAML syn region markdownAbbrev start="\*\[" end="$" let b:current_syntax = 'markdown' @@ -14,3 +17,4 @@ hi def link markdownMathBlock Special hi def link markdownComment Comment hi def link markdownYaml SpecialComment hi def link markdownAbbrev Define +hi def link markdownCite Comment