Ⅰ. 插件描述
Paste things in the same order in which you copied themⅡ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin 'fvictorio/vim-yank-queue'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle 'fvictorio/vim-yank-queue'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug 'fvictorio/vim-yank-queue'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/fvictorio/vim-yank-queue
Ⅳ. 文档说明
# vim-yank-queue
Yank pieces of text and paste them in the same order in which you copied them.
Example
Let's say you have something like this:
key 1:
key 2:
another key:
not easy to use visual block here:
copy_me
me_too
not_me
yes_me
me_too_pleaseAnd you want to copy the values below after each key (except the middle one).
You can do it one by one, or you can use some contrived macro. This plugin
lets you do it like this:

Installation
Use one of the hundred of methods that exist to install a vim plugin. I recommend vim-plug:
Plug 'fvictorio/vim-extract-variable'Mappings
The plugin adds these mappings:
yq: Yank text and insert it into the queue. For exampleyqiwwill insert
the word under the cursor, andyqqwill insert the whole line.yp: Paste the first element of the queue (i.e. the first one you copied) and
remove it.
Both of them support repeat.vim.
To-do
- Add option to disable mappings
- Add support for yanking in visual mode
- Add command for pasting the whole queue (maybe with a given separator?)