-
Notifications
You must be signed in to change notification settings - Fork 33
README updated for more options #17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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 <Plug>SystemCopy | ||
| " Mapping P to use paste | ||
| nmap P <Plug>SystemPaste | ||
| ``` | ||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I like the idea of documenting custom key bindings, but to revisit what I said in my first comment, the goal is to avoid replacing If you'd rather not use the default mappings, you can configure
custom mappings instead:
``` vim
# Use <leader> maps instead of the default key maps
nmap <leader>cp <Plug>SystemCopy
nmpa <leader>cv <Plug>SystemCopy
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Good idea, I think I mess some concepts myself, you're completely right, sorry for that. Fixed this on e9fb675 |
||
|
|
||
| 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() | ||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm a plug user myself these days, so I'd be fine with removing the Vundle section and just replacing with thus plug reference. Mind making that change? |
||
| ``` | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is equivalent to setting your Vim clipboard to use the system clipboard. This is actually the core thing I wanted to avoid as I prefer to keep Vim & system clipboard separate. This plugin exists to provide an additional operator for explicitly interacting with the system clipboard. Can you remove this section?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, right, that's a good point, I only wanted to add this info on the README as one may want to customize the keys to copy and paste through
vim-system-copyand they don't know how to. #14 talks about it. I could change theyorpkeys to the same example on this issue (YandP), what do you think?