Monday, January 21, 2013

Re: Cygwin gvim needs weird ritual to past from Windows clipboard

On 22/01/13 06:03, AndyHancock wrote:
> I installed cygwin's gvim on Windows 7. I found that pasting from the
> Windows clipboard into gvim doesn't work by clicking the middle mouse
> button unless I go through a weird ritual that I discovered by
> accident. If I don't do this, I get "E353: Nothing in register *".
>
> First, I have to highlight some text using gvim.
>
> Second, I copy from Windows. Finally I paste into gvim using the
> middle mouse button (Shift-Insert never works).
>
> I am working in a locked down environment where arranging to run
> setup/install executables take months to arrange, and opening firewall
> ports might never happen. At first, I thought the problem might be
> related to an X11 error message about ports being blocked, but then I
> discovered the above recipe.
>
> Given the above clue, can anyone suggest what the cause might be, and
> possible ways to make the ritual unnecessary? Here is the diagnostic
> data that I am able to find.
[...]

As evidenced by your "version" listing, your Cygwin gvim is compiled
with GTK2 libraries to run under X11. As such its quote and plus
registers should be different, unlike what happens with native-Windows
builds of gvim. The middle mouse button accesses register star, but
Edit→Cut, Edit→Copy and Edit→Paste access register plus. In any case, in
order to paste the Windows clipboard into Cygwin gvim, you need to make
sure that at the moment you paste, the Windows clipboard is reflected in
either the X clipboard (register +) or the X selection (register *). I'm
not sure how to accomplish this, since I never used Cygwin gvim: when I
was on Windows, I used native-Windows gvim, native-Windows console Vim,
or Cygwin console Vim, but I never ran X11. Nowadays I'm on Linux, and
of course there is no Windows clipboard on this machine.

If you can't install a "proper" Windows gvim (such as the latest version
at http://sourceforge.net/projects/cream/files/Vim/ ) somewhere under
your home directory (for instance if your sysadmin runs a batch script
every night to delete and report any unapproved exe anywhere on the
system), well, I guess you'll have to bone up on Cygwin X11
documentation (wherever that can be found) in order to find out how to
make the X11 clipboard and/or the X11 selection communicate with the
Windows clipboard.


Best regards,
Tony.
--
I was born because it was a habit in those days, people didn't know
anything else ... I was not a Child Prodigy, because a Child Prodigy is
a child who knows as much when it is a child as it does when it grows
up.
-- Will Rogers

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

No comments: