Ⅰ. 插件描述
a work in progressⅡ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin 'glts/vim-push'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle 'glts/vim-push'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug 'glts/vim-push'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/glts/vim-push
Ⅳ. 文档说明
push.vim
'Push' pastes like 'put', pushing the register text past surrounding
whitespace to one side.
This is an editing operation that comes up surprisingly often,
especially when moving around bits of text. Let's see how.
Motivation
Here's a section title that needs a slight word order tweak.
Like a Duck Walk and Quack
--------------------------
We delete the first three words and move to the end of the line.
Then, in standard Vim, p gives this -- two more edits will be
necessary to fix up the boundaries (notice the trailing whitespace):
Walk and QuackLike a Duck
--------------------------
With push.vim, the put command to use is ]=p, and the result is this:
Walk and Quack Like a Duck
--------------------------
This is the problem that push.vim solves.
Usage
By default, push.vim installs Normal mode mappings that correspond top and P.
[=pand[=Pshift the register contents to the left and upwards
while putting]=pand]=Pshift the register contents to the right and
downwards
<Plug> mappings are also provided.
Requirements
A relatively recent Vim 7.4 (after patch 7.4.513).