Sunday, January 31, 2010

Re: Windows gVim cannot read Chinese from clipboard created in Cygwin vim

Further investigation shows

(1) from console vim, we can send kind of "binary" version of content
to clipboard by:
:%y|call system('/bin/putclip', @@)

(2) from gVim, we can "correct" the clipboard contents by:
:let @+=system('/bin/getclip')
(But we suffer a flash DOS box on the status line.)

(3) However, to "communicate" between console vim and gVim on the same
Windows box, it is easy to do write/read a temp file. CJK is never
garbled through "write/read" text file.

(4) It seems not possible to send readable CJK to Windows Clipboard
from console vim.

(5) Searching "clipboard" on this group showed many relating
discussions. One interesting one is the #13 "Console cygwin Vim
using win32 clipboard" on http://groups.google.com/group/vim_dev/web/vim-patches
It looks like that patch can make @+ register available for console
vim. If that is the case, the patch should be included to the official
distribution.


Thanks

Sean

--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php

No comments:

Post a Comment