text object left and right


Ⅰ. 插件描述

text oject for left and right of a statement

Ⅱ. 基本信息

创建日期:  2011-03-18
使用用户:  7
Github星:  3
插件作者:  Vinh Tran

Ⅲ. 安装方法

使用Vundle管理器安装

在你的.vimrc下添加:
Plugin '/text-object-left-and-right'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall

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

使用NeoBundle管理器安装

在你的.vimrc下添加:
NeoBundle '/text-object-left-and-right'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall

使用VimPlug管理器安装

在你的.vimrc下添加:
Plug '/text-object-left-and-right'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall

使用Pathogen管理器安装

在终端中运行以下命令:
cd ~/.vim/bundle
git clone https://github.com/vim-scripts/text-object-left-and-right

Ⅳ. 文档说明

This simple script create text object for left and right of a statement. e.g

stri|ng = "Hello World"

| is where your cursor is, in command mode
type ciL (change inner and L for the right hand sided)

the line will become

string = |

similarily

ciH, diH, yiH etc will change, delete, yank the left hand side of the statement

this also works for ==, => as well

Note if the line end with ',' or ';' it will be the boundary of the right hand side
If there is a space before the separator (=, ==, =>) or after, they are so the the boundary

添加新评论