[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: using the clipboard



On Thursday 2008 November 27 11:18, Rick Pasotto wrote:
> On Thu, Nov 27, 2008 at 03:29:38PM +0000, Magnus Therning wrote:
> > You can also open the file in vim (or gvim) and copy to the clipboard.
> >  If you want the whole file then jump to the top (gg) then copy
> > everything to the '+' register ("+yG).  I'm sure you can use emacs in
> > some way to do the same, but you'll have to ask someone else about
> > that :)
>
> I think you meant the * register ("*yG), at least that's what ':help clip'
> gives. Another wonderful vim capability that I was unaware of.

X11 has two "clipboards".  One is the real clipboard, where items are put when 
a copy or cut command is executed and pulled when a paste command is 
executed.  The other is the selection, where text is put when selected by the 
mouse and pulled when the 3rd mouse button is clicked.  One of these is 
the "+" register, the other is the "*" register in vim compiled with X11 
support.

Some applications (and maybe DEs) intentionally try and synchronize these 
two "clipboards".  This annoys people that expect them to be separate.  It 
does sometimes make things easier on users that come from a system with a 
single clipboard but, they generally don't expect select+middle-click to work 
anyway.

If you don't need the whole file, you can use vim's visual mode (v, V 
[line-wise], or Ctrl+v [block-wise]) to select the text before yanking or 
deleting.
-- 
Boyd Stephen Smith Jr.                     ,= ,-_-. =. 
bss03@volumehost.net                      ((_/)o o(\_))
ICQ: 514984 YM/AIM: DaTwinkDaddy           `-'(. .)`-' 
http://iguanasuicide.org/                      \_/     

Attachment: pgpRRlGuWxNTs.pgp
Description: PGP signature


Reply to: