Ⅰ. 插件描述
Markdown plugin for vimⅡ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin 'hughbien/md-vim'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle 'hughbien/md-vim'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug 'hughbien/md-vim'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/hughbien/md-vim
Ⅳ. 文档说明
# Summary
Syntax and keyboard shortcuts for editing Markdown files.
Install
If you're using vim-plug, add this
line to your ~/.vimrc plugin section:
Plug 'hughbien/md-vim'
If you're using Vundle, add this
line to your ~/.vimrc plugin section:
Plugin 'hughbien/md-vim'
If you're using Pathogen, drop this
project under ~/.vim/bundle.
Otherwise, you'll need to copy two files:
$ cp ftplugin/md.vim ~/.vim/ftplugin/md.vim
$ cp syntax/md.vim ~/.vim/syntax/md.vim
For preview support:
sudo gem install mdprev
To automatically set filetype and load the plugin:
filetype plugin on " if you don't already have it
au bufnewfile,bufread *.md set ft=md
au bufreadpost *.md call md#setup("q") " where q is your leader key
Shortcuts
<leader>=turns current line into h1<leader>-turns current line into h2<leader>lre-numbers ordered lists<leader>xtoggles a task line<leader>tformats a table<leader>zfolds current file according to headers<leader>ppreview in browser<leader>Ppreview as PDF
License
Copyright Hugh Bien, http://hughbien.com.
Released under BSD License, see LICENSE.md for more info.