>> The following writes @@ (that is, @") to /dev/clipboard:
>> :call writefile(split(@@, "\n"), '/dev/clipboard')
>
> Works like a charm.
>
>> However, what the OP should do is build Vim with clipboard support
>> (using :version should show "+clipboard").
>
> Unfortunately the "+clipboard" for Cygwin uses the X-Windows
> clipboard, not the native Windows clipboard. In this case
> /dev/clipboard is a way to access the native Windows
> clipboard within Cygwin. It has the benefit of understanding
> utf-8 which putclip/getclip currently do not.
Thanks for info, but the code is going to cost you!
We have this tip:
http://vim.wikia.com/wiki/Using_the_Windows_clipboard_in_Cygwin_Vim
and it needs some cleaning. Editing the wiki would be best, but
if that does not appeal, please tell me what needs to be done.
Is there anything there that should be deleted as a duplicate or
obsolete or misguided? I guess you are saying the stuff which
uses putclip needs at least a disclaimer that it fouls up utf-8?
Should my writefile line above be added? Where in the tip: first
as best procedure with current software, or last as an
alternative?
Can readfile be used to do a paste? Like one of:
:let @@ = join(readfile('/dev/clipboard'), "\n")
:put =join(readfile('/dev/clipboard'), "\n")
Does anyone know why the quotes ("\n") are a comment with :put?
How can it be told to work like it should? I have previously
noticed that it truncates the command at the first quote.
There should be more: I think appending "\n" if more than one
line was read (to make it a linewise paste ... I think).
John
--
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:
Post a Comment