Ⅰ. 插件描述
A fork of textobj-parameter 0.1.0Ⅱ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin 'sgur/vim-textobj-parameter'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle 'sgur/vim-textobj-parameter'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug 'sgur/vim-textobj-parameter'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/sgur/vim-textobj-parameter
Ⅳ. 文档说明
vim-textobj-parameter
vim-textobj-parameter is a Vim plugin to provide text objects (a, and i, by
default) to select parameters of functions.
Usage
i,to inner parameter objectfunction(param_a, param_b, param_c) |<--->| |<--->| |<--->|a,to a parameter object including whitespaces and commafunction(param_a, param_b, param_c) |<----->| function(param_a, param_b, param_c) |<----->| function(param_a, param_b, param_c) |<----->|In addition, 'i2,' is similar to
a,except trailing whitespace characters (especially for first parameter)function(param_a, param_b, param_c) |<---->|
Configuration
By default this motion is mapped to ',' (comma). The key mapping can be overridden by adding a line similar to this to your vimrc:
let g:vim_textobj_parameter_mapping = ','Requirement
License
MIT License
Author
- Original: ampmmn
- Modified: sgur <mailto:sgurrr@gmail.com>