vim-nowchangethat


Ⅰ. 插件描述

Repeat Vim's change operator on a new motion

Ⅱ. 基本信息

创建日期:  2014-05-29
使用用户:  2
Github星:  3
插件作者:  Tom McDonald

Ⅲ. 安装方法

使用Vundle管理器安装

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

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

使用NeoBundle管理器安装

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

使用VimPlug管理器安装

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

使用Pathogen管理器安装

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

Ⅳ. 文档说明

Now Change That

nowchangethat.vim allows you to repeat the change command but on a different

  1. After using the change command (with the c operator), or in fact any
  2. insertion command, you can change a different motion to the same text.

Mappings

c. - Repeat the previous change command over the new motion defined by
{motion}.

c.. - Like c., but use the current line.

Examples

After changing a word to "foo" using ciw, change the contents of a quoted
string to "foo" using c.i". You won't have to type "foo" the second time,
and you will remain in Normal-mode.

Settings

To change the default mappings, simply provide your own mappings to the
commands below. The default mappings are as follows:

nmap c.  <Plug>(change-now)
nmap c.. <Plug>(change-now-line)

For example, to change the Normal-mode mapping to cm, use the following:

nmap cm <Plug>(change-now)

This will use the mapping cm, and the default c. will not be mapped.

g:nowchangethat_no_mappings

If this variable is defined, the default mappings will not be created.

添加新评论