Skip to content
This repository has been archived by the owner on Apr 21, 2023. It is now read-only.

Latest commit

 

History

History
53 lines (41 loc) · 1.25 KB

README.mkd

File metadata and controls

53 lines (41 loc) · 1.25 KB

This project is deprecated. Please use nvim-treesitter and colorscheme supporting treesitter

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']