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

android - net_scheduler holding wakelock -

sql - MySQL : Getting Entries from a many-to-many table -

java - Retrieving data from database using jsp (Hibernate + Spring + Maven) -