vim-textobj-codeblock


Ⅰ. 插件描述

Ⅱ. 基本信息

创建日期:  2017-01-08
使用用户:  1
Github星:  4
插件作者:  Chris Toomey

Ⅲ. 安装方法

使用Vundle管理器安装

在你的.vimrc下添加:
Plugin 'christoomey/vim-textobj-codeblock'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall

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

使用NeoBundle管理器安装

在你的.vimrc下添加:
NeoBundle 'christoomey/vim-textobj-codeblock'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall

使用VimPlug管理器安装

在你的.vimrc下添加:
Plug 'christoomey/vim-textobj-codeblock'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall

使用Pathogen管理器安装

在终端中运行以下命令:
cd ~/.vim/bundle
git clone https://github.com/christoomey/vim-textobj-codeblock

Ⅳ. 文档说明

vim-textobj-codeblock

This plugin provides a custom text object to target github-style fenced code
blocks like the following:

  
class MyClass
  def my_method
    puts "hello world"
  end
end


</pre>

The plugin provides a text object to select the contents of the codeblock, as
well as the entire codeblock (including the opening and closing backtick lines).

Usage

The plugin provides the following mappings by default:

MappingFunctionality
icContents of the codeblock
acEntire codeblock, including backtick lines

Note - The plugin requires the opening line of the codeblock to include a
filetype declaration.

Installation

This plugin relies on the amazing [textobj-user][] plugin which provides nearly
all the actual functionality, with this plugin specifying the pattern to target
the codeblock.

To install, you'll need both this plugin and textobj-user. If you don't have a
preferred installation method, I recommend using [vim-plug][].

Plug 'kana/vim-textobj-user'
Plug 'christoomey/vim-textobj-codeblock'

添加新评论