Parameter Text Objects


Ⅰ. 插件描述

Defines parameter text objects

Ⅱ. 基本信息

创建日期:  2010-02-18
使用用户:  16
Github星:  7
插件作者:  David Larson

Ⅲ. 安装方法

使用Vundle管理器安装

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

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

使用NeoBundle管理器安装

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

使用VimPlug管理器安装

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

使用Pathogen管理器安装

在终端中运行以下命令:
cd ~/.vim/bundle
git clone https://github.com/vim-scripts/Parameter-Text-Objects

Ⅳ. 文档说明

This script defines a parameter text object. A parameter is the text between parentheses or commas, typically found in a function's argument list.

See:
:help text-objects
  for a description of what can be done with text objects.

Also See:
:help a(
  If you want to operate on the parentheses also.

Like all the other text-objects, a parameter text object can be selected following these commands: 'd', 'c', 'y', 'v', etc. The script defines these operator mappings:

   aP    "a parameter", select a parameter, including one comma (if there is one).

   iP    "inner parameter", select a parameter, not including commas.

This is a slick version of argtextobj vimscript #2699; though mine is shorter and can handle counts (ie. c3aP).

NOTE: Negative ratings don't help the script to improve. Instead, please send me an email (shown in my profile). Thank you.

添加新评论