enricoferrero
enricoferrero

Reputation: 2319

How can I make vim use html and markdown syntax highlighting on the same file?

I use remark to make html slides from markdown code in vim.

Remark requires to use an html template containing both html and markdown code in it.

How can I make vim use both html and markdown syntax highlighting on the same html file?

Upvotes: 1

Views: 345

Answers (1)

Ingo Karkat
Ingo Karkat

Reputation: 172550

The default Markdown syntax plugin (by Tim Pope) that ships with Vim already includes HTML syntax. From $VIMRUNTIME/syntax/markdown.vim:

" Vim syntax file
" Language:     Markdown
" Maintainer:   Tim Pope <[email protected]>
" Filenames:    *.markdown
" Last Change:  2013 May 30

[7 lines deleted]

runtime! syntax/html.vim
unlet! b:current_syntax

Upvotes: 5

Related Questions