vim plugin for highliting code in markdown quote
Vim script
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
autoload
plugin
.gitignore
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']