md-vim


Ⅰ. 插件描述

Markdown plugin for vim

Ⅱ. 基本信息

创建日期:  2011-06-28
使用用户:  11
Github星:  11
插件作者:  Hugh Bien

Ⅲ. 安装方法

使用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>l re-numbers ordered lists
  • <leader>x toggles a task line
  • <leader>t formats a table
  • <leader>z folds current file according to headers
  • <leader>p preview in browser
  • <leader>P preview as PDF

License

Copyright Hugh Bien, http://hughbien.com.
Released under BSD License, see LICENSE.md for more info.

添加新评论