vim-markdown-quote-syntax


Ⅰ. 插件描述

vim plugin for highliting code in markdown quote

Ⅱ. 基本信息

创建日期:  2013-08-01
使用用户:  97
Github星:  54
插件作者:  Tomohiro Hashidate

Ⅲ. 安装方法

使用Vundle管理器安装

在你的.vimrc下添加:
Plugin 'joker1007/vim-markdown-quote-syntax'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall

对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。

使用NeoBundle管理器安装

在你的.vimrc下添加:
NeoBundle 'joker1007/vim-markdown-quote-syntax'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall

使用VimPlug管理器安装

在你的.vimrc下添加:
Plug 'joker1007/vim-markdown-quote-syntax'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall

使用Pathogen管理器安装

在终端中运行以下命令:
cd ~/.vim/bundle
git clone https://github.com/joker1007/vim-markdown-quote-syntax

Ⅳ. 文档说明

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

添加新评论