Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 17 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
```

Copy link
Copy Markdown
Owner

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?

Copy link
Copy Markdown
Author

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-copy and they don't know how to. #14 talks about it. I could change the y or p keys to the same example on this issue (Y and P), what do you think?

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The 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 y and p. Can you rewrite this in terms of a leader mapping? Something like:

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

@lucaspbordignon lucaspbordignon Apr 24, 2018

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The 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()

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The 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?

```