Friday, October 23, 2015

Re: Clipboard copy and paste

> Ah, then you want the "+ register. On X systems (Linux, BSD, etc),
> there are two clipboards[*], one is the "primary selection"
> clipboard, accessed with "* as you mention. This is the one that is
> also fed by selecting things in a terminal and retrieved by using
> the middle-mouse. The other is the "clipboard" clipboard (I can't
> say I care much for the terminology, but that's history for you).
> This one is accessed with vim's "+ register and is usually what
> other applications access when doing a cut/copy/paste that you're
> used to.
>
> I've just taken to using "+ almost all the time on all platforms,
> since that's *usually* what I mean, unless it's a rare time I want
> to convert a primary-selection to a clipboard-selection, in which
> case it's often easiest for me to do that with vim:
>
> :let @+=@*
>
> Hope that makes better sense of it,
>
> -tim
>
>
> [*]
> my understanding is that there are multiple selection clipboards,
> but that just about no apps actually use it

Sorry for reviving such an old post but I was having the same issue as the OP in trying to copy all of the lines from a text file into the system clipboard so that I could paste (via Ctrl-V) it into another application. I had kept trying to use gg"*yG based on what I read elsewhere with no luck but was able to successfully use gg"+yG instead based on Tim's response. Glad I came across his reply!

--
--
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: