Loading ...
Sorry, an error occurred while loading the content.
 

Re: Feature Request: copy from vim, paste to Cocoa app: Would like menu option to 'Copy with Attributes'

Expand Messages
  • björn
    ... Hi Eric, From the Cocoa perspective this feature is simple to implement: when copying you can put multiple representations of the text on the pasteboard.
    Message 1 of 2 , Jul 27, 2008
      2008/7/27 E. Wing <ewmailing@...>:
      >
      > I was recently writing up some documentation/tutorials and I was doing
      > my coding/testing in vim. I would then copy and paste my code from Vim
      > to my word processor (e.g. Pages).
      >
      > I wanted my documentation to get the font style and syntax coloring
      > that I have in vim.
      >
      > But I forgot that Vim copies everything as pure ascii text and there
      > would be no style information.
      >
      > I ended up having to go into Xcode and opening up my file there to
      > copy, but Xcode's syntax highlighting for languages is more limited.
      >
      > Anyway, I realized that being able to copy text with all the fancy
      > attributes would be useful. I was thinking a new 'Copy with
      > Attributes' feature would be handy. This would be somewhat the
      > analogous counterpart to 'Paste and Match Style'. Perhaps the hot-key
      > command would also borrow from that: Shift-Cmd-Option-C.
      >
      > I'm not sure how hard this would be. I presume NSAttributedString is
      > the best way to transfer fancy text. But I don't know if the vim_mac
      > code has anything to do with NSAttributedString.
      >
      > But I thought I would suggest the idea.

      Hi Eric,

      From the Cocoa perspective this feature is simple to implement: when
      copying you can put multiple representations of the text on the
      pasteboard. What you're asking for could be achieved by putting the
      selection in "rich text" format on the pasteboard. However, (as far
      as I know) Vim has no way of giving you the selected text complete
      with attributes (such as font, bold, etc.) which makes this feature
      hard to implement. In fact, hard enough for me not to want to attempt
      it. :-/

      Björn

      --~--~---------~--~----~------------~-------~--~----~
      You received this message from the "vim_mac" maillist.
      For more information, visit http://www.vim.org/maillist.php
      -~----------~----~----~----~------~----~------~--~---
    Your message has been successfully submitted and would be delivered to recipients shortly.