eraseSubword


Ⅰ. 插件描述

Erase one subword from a camel case word or from a _ delimited word

Ⅱ. 基本信息

创建日期:  2005-09-21
使用用户:  1
Github星:  2
插件作者:  Ilya Bobir

Ⅲ. 安装方法

使用Vundle管理器安装

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

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

使用NeoBundle管理器安装

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

使用VimPlug管理器安装

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

使用Pathogen管理器安装

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

Ⅳ. 文档说明

Makes <C-H> in insert mode delete one subword from a camel case word or one _ delimited subword before the cursor.

For example, the following word is typed in an editor:

one_twoThree

First <C-H> will delete "Three", second - "two" and the third will completely erase the word.

Default mapping could be changed by setting g:EraseSubword_insertMap to the desired key.  Setting s:EraseSubword_insertMap to an empty string would remove default mapping at all.  Mapping could be changed later (for example in file type plugin or in some auto commands) using EraseSubword_setInsertMap function that takes one argument - new value for the g:EraseSubword_insertMap.  Empty value would disable plugin and any other value would add new mapping (old mapping would be removed).

There is also a possibility to use buffer local mapping.  Than you probably want to set g:EraseSubword_insertMap to an empty string (so that there would be no global mapping) and then use EraseSubword_setlocalInsertMap in FileType auto command or BufNew, BufCreate and a like to set buffer local mapping.  EraseSubword_setlocalInsertMap uses same syntax as EraseSubword_insertMap - one argument that is a desired mapping or empty string to remove existing mapping.

添加新评论