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

14072Re: how to copy into system clipboard

Expand Messages
  • Benjamin Klein
    Nov 16 2:49 PM
    • 0 Attachment
      On Nov 16, 2013, at 3:56 AM, Kyle Lippincott <spectral@...> wrote:

      I think this won't work, because the terminal vim has no method of communicating with the mac clipboard.  They're using the apple-provided vim, and also using a separate terminal app (so if there WAS some magic with Terminal.app + apple's vim, it's become less likely to work, but I don't think there is).

      I use the Apple-provided Vim on OS X with both Terminal and iTerm2. I have this in my ~/.vimrc:

      " In visual mode, use Y to copy to system clipboard
      vnoremap Y "*y

      " In normal mode, do the same with the current line
      nnoremap Y "*yy

      So with a visual selection, I can use Y to copy to OS X’s clipboard (and without a selection, I can use it in normal mode to copy the current line likewise). I can confirm that it works -- I just opened my ~/.vimrc in Terminal and used Y to copy those lines so I could paste them here in Mail.



      You received this message from the "vim_mac" 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
      You received this message because you are subscribed to the Google Groups "vim_mac" group.
      To unsubscribe from this group and stop receiving emails from it, send an email to vim_mac+unsubscribe@....
      For more options, visit https://groups.google.com/groups/opt_out.
    • Show all 16 messages in this topic