vim-commaobject


Ⅰ. 插件描述

A text object for manipulating comma-delimited lists

Ⅱ. 基本信息

创建日期:  2010-10-07
使用用户:  24
Github星:  18
插件作者:  Austin Taylor

Ⅲ. 安装方法

使用Vundle管理器安装

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

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

使用NeoBundle管理器安装

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

使用VimPlug管理器安装

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

使用Pathogen管理器安装

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

Ⅳ. 文档说明

Comma Object

This Vim extention defines a text object (,) for manipulating comma-delimited lists.

An example:

["one", "two", "three"]
          ^

da,

["one", "three"]
      ^

a, will select the comma, in addition to the contents.

Another example:

["one", "two", "three"]
          ^

ci,

["one, , "three"]
       ^

i, will only select the contents.

There is support for (), [], and {} enclosed lists.

There is also support for lists ending with do, indicating a Ruby method without parentheses.

To do

  • Handle first arguments in method calls without parentheses.
  • Handle last arguments in method calls without parentheses that do not have do on the end.
  • Handle lists spanning lines.

添加新评论