On 12 July 2010 17:10, Bram Moolenaar wrote:
>
>> On Jul 11, 2:20 pm, Bram Moolenaar <b...@moolenaar.net> wrote:
>> > Jjgod Jiang wrote (a long time ago):
>> > > >> Running vim under Mac OS X terminal do not support copy to/from
>> > > >> system clipboard currently, this patch add this feature. To have
>> > > >> this feature in mainstream, we receive the following benifits:
>> >
>> > > >> 1. We can copy from/to system clipboard without running GUI.
>> > > >> =A0 =A0(Default vim builds shipped with Mac OS X do not have GUI
>> > > >> =A0 =A0 enabled, so it can share this feature.)
>> > > >> 2. We don't need to duplicate code in GUI implementations like
>> > > >> =A0 =A0MacVim or vim-cocoa.
>> >
>> > > >> The clipboard handling code is derived from MacVim.
>> >
>> > > >> To use Cocoa APIs, we need to convert os_macosx.c into an Obj-C
>> > > >> file. Other changes are trivial.
>> >
>> > > > A few remarks were made after this patch was submitted, but I don't
>> > > > think I ever saw an updated patch. =A0Is it still coming?
>> >
>> > > I made the remark that it would be "nicer" to use the C-API (Core
>> > > Foundation) to implement Copy/Paste instead of converting os_macosx.c
>> > > to an Objective-C file and then using the MacVim Copy/Paste code which
>> > > uses the Objective-C API (Foundation).
>> >
>> > > It would not be very difficult to write such a patch but I don't think
>> > > anybody ever volunteered to do it.  The advantages of rewriting the
>> > > patch are mostly aesthetic -- the functionality would be identical.
>> > > If you Bram can live with that then I think it is safe to merge this
>> > > patch (here is one of the problems though: since the patch renames a
>> > > whole file it is a bit tricky to review -- I believe it is fine but
>> > > have not checked it myself).  If you would prefer not to use
>> > > Objective-C then it is possible to rewrite it using only C.
>> >
>> > > What would you prefer Bram?
>> >
>> > I don't know enough about the advantages and disadvantages.  I think at
>> > least the issues with block mode should be fixed.  Otherwise one can
>> > just as well use the clipboard throught the terminal, right?
>> >
>> > When going with Objective-C, would there be disadvantages?  Some people
>> > who can't build the binary?  Does the executable become bigger?  More
>> > dependencies on libraries?
>>
>> What would be the advantage over using:
>>
>> vmap ,y y:call system("pbcopy", getreg("\""))<CR>
>> nmap ,p :call setreg("\"",system("pbpaste"))<CR>p
>>
>> And some syntactic sugar for mapping?
>
> Not being able to pass block-wise selection.

...and I just had a more careful look: this patch does not include the
block-wise
selection code for copy/paste that is in MacVim.

Bram: do not merge this patch.  It will have to be either rewritten or
updated to include the latest MacVim copy/paste code.  I'll see if
have some time to spare to take a look at it, otherwise I guess we'll
have to wait until Vim 7.4.

Björn

-- 
You received this message from the "vim_dev" 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

Raspunde prin e-mail lui