X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL,BAYES_00,DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,KHOP_SPAMHAUS_DROP,KHOP_THREADED,NML_ADSP_CUSTOM_MED,RCVD_IN_DNSWL_NONE,RP_MATCHES_RCVD,SPF_HELO_PASS X-Spam-Check-By: sourceware.org To: cygwin AT cygwin DOT com From: Andy Subject: Re: Cygwin gvim needs weird ritual to past from Windows clipboard Date: Fri, 25 Jan 2013 06:15:19 +0000 (UTC) Lines: 58 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit User-Agent: Loom/3.14 (http://gmane.org/) X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Alan Thompson gmail.com> writes: > Everything I said works both ways, both Cygwin->Windoze and > Windoze->Cygwin. The only difference in GVim is whether you use > yank > ("Y") or put ("P"). This works for both the win32 version of GVim > and > the Cygwin X11 version of GVim. To be specific: > > - Highlight something in your browser and type Crtl-C > - Go into GVim and type "*P (i.e. double quote-asterisk-capital > P). > > GVim sees the windows clipboard as a special buffer named * (i.e. > asterisk, star, whatever). The double-quote references a buffer, > star > is the name of the buffer, and capital P means "put contents here". > Of course, both yank and put have both uppercase versions (whole > lines) and lowercase versions (partial lines). > > Have you tried this? Yes, I tried it for both PC-based gvim and Cygwin gvim on X11. Both work. However, at the time, clicking middle button also worked in pasting into gvim. I will have to try again when middle button doesn't work. I have a gut feeling about a possible cause. I find myself frequently exasperated that the input keyboard changed from US to US - International (which I use, but I want to use it only when I choose). This random switch happens even though I disabled all hot keys for keyboard language switching. No amount of fuddling switches it back sometimes, so I end up rebooting. What an unbelievable pain. Well. The double-quote is treated as special for the International keyboard. If middle-clicking somehow emulates a keyboard invocation of the vim registers, then the emulation of a double-quote keystroke might be part of that. And if the double-quote is generated at a stage before the keyboard language conversions, then it will be intercepted by the keyboard language handlers and mangled. It sounds like I'm grasping, but I didn't just dream this out of thin air. When I tried invoking the * register (actually, I like the + register better since I already lift the pinky to get at the double quote), gvim simply rings the error bell and bawks at me. WTH, I think, it's as if I'm entering illegal key combinations. Well, Windows randomly changes keyboard languages so often that it didn't take too long for that to come under suspicion. It was a simple test on notepad to confirm that, yes, woops, Windows did it again (sounds like a pop song). And yes, a reboot was needed (though that's not always the case). I hope that this is somehow also the cause for the intermittent problems in cutting and pasting by highlighting rather using vim normal-mode yanks/cuts/deletes/puts. I mean, even though it's a bummer, at least I'll know what causes it, and a reboot isn't always necessary (heck it's like playing Russion Roulette). -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple