Ⅰ. 插件描述

Plugin that adds a 'cut' operation separate from 'delete'

Ⅱ. 基本信息

创建日期:  2013-11-14
使用用户:  20
Github星:  55
插件作者:  Steve Vermeulen

Ⅲ. 安装方法


Plugin 'svermeulen/cutlass-vim'
… 然后在Vim中运行以下命令:
:source %

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


NeoBundle 'svermeulen/cutlass-vim'
… 然后在Vim中运行以下命令:
:source %


Plug 'svermeulen/cutlass-vim'
… 然后在Vim中运行以下命令:
:source %


cd ~/.vim/bundle
git clone

Ⅳ. 文档说明


Cutlass overrides the delete operations to actually just delete and not affect the current yank.

It achieves this by overriding the following keys to always use the black hole register: c, cc, C, s, S, d, dd, D, x, X. Note that if you have already mapped these keys to something else (like we do below with x) then it will not change it again.

After including this plugin, all of these operations will simply delete and not cut. However, you will still want to have a key for 'cut', which you can add by including the following to your .vimrc:

nnoremap m d
xnoremap m d

nnoremap mm dd
nnoremap M D

m here can be thought of as 'move'. Note that you will be shadowing the 'add mark' key if you go with this binding. Or you might want to use the x key instead:

nnoremap x d
xnoremap x d

nnoremap xx dd
nnoremap X D

And then use dl instead of x every time you want to delete a single character. You might also consider using s with vim-subversive and then using cl as a replacement in the same way.

Why would you want to do this?

See here

You might also consider installing vim-yoink which contains other clipboard related improvements mentioned in this article.


Based off of vim-easyclip and also Drew Neil's ideas (as well as the name)