From d2458ba6aed502d18a583b751e3feaaf346bc0d5 Mon Sep 17 00:00:00 2001 From: Lucas Bordignon Date: Sun, 22 Apr 2018 21:59:38 -0300 Subject: [PATCH 1/2] README updated for more options --- README.md | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 0d47579..f68179c 100644 --- a/README.md +++ b/README.md @@ -31,7 +31,7 @@ Clipboard Utilities - OSX - `pbcopy` and `pbpaste` - Windows - `clip` and `paste` - Linux - `xsel` - + **Note:** `xsel` can be installed with `apt-get install xsel` if your system doesn't have it installed Options @@ -49,20 +49,30 @@ And to declare custom paste command use: let g:system_copy#paste_command='xclip -sel clipboard -o' ``` +To make the original yank vim command to works with this plugin, one can add the following to +it's `.vimrc`: + +``` +" Mapping Y to use copy +nmap Y SystemCopy +" Mapping P to use paste +nmap P SystemPaste +``` + Installation ------------ -If you don't have a preferred installation method, I recommend using [Vundle](https://github.com/VundleVim/Vundle.vim). -Assuming you have Vundle installed and configured, the following steps will -install the plugin: +If you don't have a preferred installation method, I recommend using [Plug](https://github.com/junegunn/vim-plug). Add the following line to your `~/.vimrc` and then run `:PluginInstall` from within Vim: ``` vim -call vundle#begin() +call plug#begin() " ... -Plugin 'christoomey/vim-system-copy' +Plug 'christoomey/vim-system-copy' " ... -call vundle#end() +call plug#end() ``` + + From e9fb67560828130160418d3ecbf973e78a07dd2e Mon Sep 17 00:00:00 2001 From: Lucas Bordignon Date: Mon, 23 Apr 2018 21:49:07 -0300 Subject: [PATCH 2/2] Changing the keybind for custom keys --- README.md | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index f68179c..a3e8a42 100644 --- a/README.md +++ b/README.md @@ -48,16 +48,14 @@ And to declare custom paste command use: ``` vim let g:system_copy#paste_command='xclip -sel clipboard -o' ``` +If you'd rather not use the default mappings, you can configure +custom mappings in you `~/.vimrc` instead, as: -To make the original yank vim command to works with this plugin, one can add the following to -it's `.vimrc`: +``` vim +# Use maps instead of the default key maps +nmap cp SystemCopy +nmap cv SystemPaste -``` -" Mapping Y to use copy -nmap Y SystemCopy -" Mapping P to use paste -nmap P SystemPaste -``` Installation ------------ @@ -74,5 +72,3 @@ Plug 'christoomey/vim-system-copy' " ... call plug#end() ``` - -