Ⅰ. 插件描述
Make cw consistent with dw, yw, et alⅡ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin 'ap/vim-you-keep-using-that-word'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle 'ap/vim-you-keep-using-that-word'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug 'ap/vim-you-keep-using-that-word'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/ap/vim-you-keep-using-that-word
Ⅳ. 文档说明
You Keep Using That Word
A tiny little plugin for Vim
When using word motion with the c command, it does not mean what Vim normally
thinks it means. As the documentation says:
Special case: When the cursor is in a word,
cwandcWdo not include the
white space after a word, they only change up to the end of the word. This is
because Vim interpretscwas change-word, and a word does not include the
following white space.
But you can already do the same yourself by using ce and cE, whereas this
supposedly helpful exception leaves you using workarounds such as cf<Space>
in order to do what you normally would use cw or cW for.
This plugin removes the special exception from cw/cW. It does nothing else,
and it has no configuration options.
Credits
Thanks to Josh Howe (@joshtch) for pointing out my omission of the WORD motion
in the initial release of this plugin.