copy-cut-paste.vim


Ⅰ. 插件描述

Vim plugin for naturally copy, cut, and paste between buffer and system clipboard

Ⅱ. 基本信息

创建日期:  2015-08-07
使用用户:  19
Github星:  21
插件作者:  Nikyle Nguyen

Ⅲ. 安装方法

使用Vundle管理器安装

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

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

使用NeoBundle管理器安装

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

使用VimPlug管理器安装

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

使用Pathogen管理器安装

在终端中运行以下命令:
cd ~/.vim/bundle
git clone https://github.com/nlknguyen/copy-cut-paste.vim

Ⅳ. 文档说明

# copy-cut-paste.vim
Keymaps for easy copying, cutting, and pasting between Vim terminal buffer and system clipboard

Require +clipboard

To check:

vim --version | grep clipboard

If not available and you're on Ubuntu, the fastest way to have it is through this package:

sudo apt-get install vim-gtk

GVim has it by default in all OSes

Keymaps

Default

ModeKeyAction
NormalQCCopy a whole line to system clipboard
VisualQCCopy selected text to system clipboard
NormalQXCut a whole line to system clipboard
VisualQXCut selected text to system clipboard
NormalQVPaste from system clipboard

To turn off default keymapping and use your own:

let g:copy_cut_paste_no_mappings = 1

" Use your keymap
nmap QC <Plug>CCP_CopyLine
vmap QC <Plug>CCP_CopyText

nmap QX <Plug>CCP_CutLine
vmap QX <Plug>CCP_CutText

nmap QV <Plug>CCP_PasteText

Pasting with smartindent automatically turned off temporarily

ModeKey
NormalUse your terminal key for pasting, ex: Ctrl+Shift+V in Ubuntu and Shift+Insert in Windows

Install

Using Vundle plugin manager:

Plugin 'NLKNguyen/copy-cut-paste.vim'

Or manually: copy copy-cut-paste.vim file to your ~/.vim/plugin/ directory

License

Same as Vim

添加新评论