vim plugin for highliting code in markdown quote
Vim script
Latest commit e1b6684 Nov 11, 2014 @joker1007 Merge pull request #4 from rcmdnk/codeblocks
Fix spell check (needed if such java is included) and added other codeblocks
Permalink
Failed to load latest commit information.
autoload
plugin
.gitignore init Aug 1, 2013
README.mkd
screenshot.png

README.mkd

vim-markdown-quote-syntax

Enable highlight markdown code block with appropriate syntax.

Screenshot

screenshot.png

Option

" Add syntax rule
let g:markdown_quote_syntax_filetypes = {
        \ "coffee" : {
        \   "start" : "coffee",
        \},
        \ "css" : {
        \   "start" : "\\%(css\\|scss\\)",
        \},
        \ "mustache" : {
        \   "start" : "mustache",
        \},
        \ "haml" : {
        \   "start" : "haml",
        \},
  \}

" 'start' and 'end' is vim regular expression.
" need to care backslash.

" Add code blocks
let g:markdown_quote_syntax_codeblocks = {
        \["^\\s*{% *highlight \\+", "\\( .*%\\|%\\)}",
          \"^\\s*{% *endhighlight\\( .*%\\|%\\)}"],
  \}

" Each codeblock is defined as:
"
"    'codeblock[0].filetype.codeblock[1]<code lines>codeblock[2]'
"
" Above example is for the liquid highlight tag. (It is already included by default.)
"    {% highlight vim %}
"    any codes
"    ...
"    {% endhighlight %}

" Add other file types in which quote syntax should be on.
let g:markdown_quote_syntax_on_filetypes = ['text']