Adding YAML syntax highlighting throughout an entire markdown file (in vim) -


i have plugin vim-markdown installed. among other things, adds syntax highlighting markdown files. in markdown files there yaml headers:

--- yaml: contents more: yaml ---  # usual markdown etc. 

using vim-markdown, part of file enclosed in --- correctly rendered yaml (from syntax highlighting point of view). rest of file rendered markdown.

question: how make that, no matter enclosing --- located -- yaml rendered in between?

attempt: found in ~/.vim/bundle/vim-markdown/syntax/markdown.vim following snippet:

syn include @yamltop syntax/yaml.vim syn region comment matchgroup=mkddelimiter start="\%^---$" end="^---$" contains=@yamltop 

i removed \% in start= field , tried again. didn't work :(

in case have not yet found solution: add following .vimrc:

let g:vim_markdown_frontmatter = 1 

it documented here:

https://github.com/plasticboy/vim-markdown


Comments

Popular posts from this blog

java - pagination of xlsx file to XSSFworkbook using apache POI -

Unlimited choices in BASH case statement -

apache - How do I stop my index.php being run twice for every user -