Ⅰ. 插件描述
iA Writer keyboard shortcuts in VimⅡ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin 'vvvfo/markdown-shortcuts-vim'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle 'vvvfo/markdown-shortcuts-vim'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug 'vvvfo/markdown-shortcuts-vim'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/vvvfo/markdown-shortcuts.vim
Ⅳ. 文档说明
# markdown-shortcuts.vim
Enables easy emphasis / strong / in-line code block and other syntaxes for editing Markdown files. Basically all the iA Writer shortcuts and more with customisability.
Usage
<Plug> mappings are provided, assign them to any combinations you like, then put the mappings into your .vimrc. For example, if you use MacVim, put the following code into your .gvimrc (it is important to put them in .gvimrc instead of .vimrc):
if has('gui_macvim')
" unset two original menu shortcuts to create new mappings
macmenu &File.New\ Tab key=<nop>
macmenu &Tools.Make key=<nop>
" iA Writer Mode: On :)
nmap <D-1> <Plug>(MarkdownToggleHeaderH1)
nmap <D-2> <Plug>(MarkdownToggleHeaderH2)
nmap <D-3> <Plug>(MarkdownToggleHeaderH3)
nmap <D-4> <Plug>(MarkdownToggleHeaderH4)
nmap <D-5> <Plug>(MarkdownToggleHeaderH5)
nmap <D-6> <Plug>(MarkdownToggleHeaderH6)
nmap <D-k> <Plug>(MarkdownInsertLink)
nmap <D-b> <Plug>(MarkdownToggleBold)
nmap <D-i> <Plug>(MarkdownToggleItalics)
nmap <D-t> <Plug>(MarkdownToggleInlineCode)
endifOr if you do not use MacVim, you can still create custom mappings like nmap <leader>mi <Plug>(MarkdownToggleItalics). (If you really love iA Writer (like me :), consider also trying out goyo.vim and limelight.vim)
Installation
Vundle
Put the following line into your .vimrc:
Plugin 'VVVFO/markdown-shortcuts.vim'Then source the .vimrc and run :PluginInstall.
VimPlug
Put this into your .vimrc:
Plug 'VVVFO/markdown-shortcuts.vim'Source the .vimrc then run :PlugInstall.
Pathogen
Run the following command in your terminal:
cd ~/.vim/bundle
git clone http://github.com/VVVFO/markdown-shortcuts.vimNeobundle
Place this in your .vimrc:
NeoBundle 'VVVFO/markdown-shortcuts.vim'Then source the file and run :NeoBundleInstall.