Sunday, September 14, 2014

Re: Select Copy Not Work

On 2014-09-14, huangyingw wrote:
> Hi,
> I am trying to enable the select copy to system
> clipboard. My intention is to use "v" to select
> part to copy, and press "Y" to copy to system
> clipboard.
> Bellowing is my part of my vim script:
> [code]
> nnoremap Y "+yy
> clipboard=unnamedplus
> [/code]
> Bellowing is my vim version information:
> [code]
> huangyingw@mini14:~$ vim --version
> VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Jan 2 2014 19:39:59)
> Included patches: 1-52
> huangyingw@mini14:~$ vim --version|grep clipboard
> +clipboard +iconv +path_extra +toolbar
> +eval +mouse_dec +startuptime +xterm_clipboard
> huangyingw@mini14:~$
> [/code]

It should be sufficient to put this in your vimrc:

set clipboard=unnamedplus

You omitted the "set" portion from your code above. Since setting
'clipboard' to include "unnamedplus" automatically uses the +
register, there is no need to use your mapping.

You can use the commmand

:di

to view the contents of your registers to see whether they contain
what you think they should.

Regards,
Gary

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment