Ⅰ. 插件描述
Extract "MarkdownEditBlock" Command from gabrielelana/vim-markdownⅡ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin 'chandlercjy/vim-markdown-edit-code-block'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle 'chandlercjy/vim-markdown-edit-code-block'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug 'chandlercjy/vim-markdown-edit-code-block'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/chandlercjy/vim-markdown-edit-code-block
Ⅳ. 文档说明
# Markdown for Vim -- MarkdownEditBlock
Extract the MarkdownEditBlock command from
gabrielelana/vim-markdown
Installation
vim-plug:
If you use vim-plug, add the following
to your plugin section:
Plug 'Chandlercjy/vim-markdown-edit-code-block', { 'for':'markdown'}
And then execute the following command in your shell:
$ vim +PlugInstall
Configuration
add the following line to your ~/.vimrc
autocmd FileType markdown nmap <buffer> <silent> <leader>e :MarkdownEditBlock<CR>Features
Code blocks and pieces of Markdown in the current file can be edited in a
separate buffer and synchronized back when you finish- Inside a Ruby fenced code block,
<Leader>eopens a temporary buffer with
the right file type - Select a range in visual mode and
<Leader>eopens a temporary buffer with
file typemarkdown. I call it Focus Mode because you can edit a portion
of a Markdown file in isolation
- Finally, on an empty line,
<Leader>easks for a file type and then opens a
temporary buffer with that file type - When you leave the temporary buffer the content syncs back to the main file

- Inside a Ruby fenced code block,