Ⅰ. 插件描述
Replace operator for VimⅡ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin 'chun-yang/vim-operator-replace'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle 'chun-yang/vim-operator-replace'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug 'chun-yang/vim-operator-replace'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/chun-yang/vim-operator-replace
Ⅳ. 文档说明
# R Operator
Provide R operator for vim.
For example, 'Riw' is similar (but not same) to 'viwp'.
Configuration
NOTE: by default this plugin does not add any new commands.
You MUST map keys to the R operator.
Here is the recommended way for mapping:
nmap R <Plug>ReplaceOperator
vmap R <Plug>ReplaceOperator
nmap RR 0Rg$
nmap Rr <Plug>ReplaceOperatorWithLastReplaced
vmap Rr <Plug>ReplaceOperatorWithLastReplaced
nmap RrR 0Rrg$(Advanced) How does R manipulate registers
This plugin use '-' register to save replaced text.
When you use <Plug>ReplaceOperator, '"' register is used to replace the
selected text.
When you use <Plug>ReplaceOperatorWithLastReplaced, '-' register is used
to replace the selected text.