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:
Comments
Post a Comment