1

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?

enricoferrero
  • 2,249
  • 1
  • 23
  • 28

1 Answers1

5

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 <vimNOSPAM@tpope.org>
" Filenames:    *.markdown
" Last Change:  2013 May 30

[7 lines deleted]

runtime! syntax/html.vim
unlet! b:current_syntax
Ingo Karkat
  • 167,457
  • 16
  • 250
  • 324
  • Tim Pope's markdown also supports [fenced code blocks](http://www.reddit.com/r/vim/comments/2x5yav/markdown_with_fenced_code_blocks_is_great/). Sadly this is not documented. – Peter Rincker Mar 25 '15 at 15:42