diff options
author | Adam Stankiewicz <sheerun@sher.pl> | 2019-12-12 16:43:09 +0100 |
---|---|---|
committer | Adam Stankiewicz <sheerun@sher.pl> | 2019-12-12 16:43:09 +0100 |
commit | cea0d08a062478503814e51aa21c6486a0dd1b21 (patch) | |
tree | 085f856a71019a5f9046501b9f45116286726d51 /syntax/markdown_jekyll.vim | |
parent | 43085dc02f34d7d54208e6e20989d4779bffe71c (diff) | |
download | vim-polyglot-4.1.4.tar.gz vim-polyglot-4.1.4.zip |
Replace markdown plugin for faster onev4.1.4
Diffstat (limited to 'syntax/markdown_jekyll.vim')
-rw-r--r-- | syntax/markdown_jekyll.vim | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/syntax/markdown_jekyll.vim b/syntax/markdown_jekyll.vim new file mode 100644 index 00000000..68bf549b --- /dev/null +++ b/syntax/markdown_jekyll.vim @@ -0,0 +1,34 @@ +if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'markdown') == -1 + +let b:markdown_in_jekyll=0 + +if getline(1) =~ '^---\s*$' + let b:markdown_in_jekyll=1 + + syn region markdownJekyllFrontMatter matchgroup=markdownJekyllDelimiter contains=@NoSpell + \ start="\%^---" end="^---$" + + syn region markdownJekyllLiquidTag matchgroup=markdownJekyllDelimiter contains=@NoSpell oneline + \ start="{%" end="%}" + + syn region markdownJekyllLiquidOutputTag matchgroup=markdownJekyllDelimiter contains=@NoSpell oneline + \ start="{{" skip=/"}}"/ end="}}" + + syn region markdownJekyllLiquidBlockTag matchgroup=markdownJekyllDelimiter contains=@NoSpell + \ start="{%\s*\z(comment\|raw\|highlight\)[^%]*%}" end="{%\s*\%(no\|end\)\z1\s*%}" + + silent spell! nocomment + silent spell! endcomment + silent spell! nohighlight + silent spell! endhighlight + silent spell! noraw + silent spell! endraw + + hi def link markdownJekyllFrontMatter NonText + hi def link markdownJekyllLiquidTag NonText + hi def link markdownJekyllLiquidOutputTag NonText + hi def link markdownJekyllLiquidBlockTag NonText + hi def link markdownJekyllDelimiter Delimiter +endif + +endif |