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

'unnamedplus' clipboard issue with homebrew vim

Expand Messages
  • Anton Backer
    Has anybody here tried setting the clipboard setting to unnamedplus with good results? Here are my experiences, contrasted with what I ve come to expect
    Message 1 of 3 , Feb 17, 2014
      Has anybody here tried setting the 'clipboard' setting to 'unnamedplus' with good results?

      Here are my experiences, contrasted with what I've come to expect from my time on Ubuntu. I have the following in my .vimrc:

      " Default clipboard to "+
      set clipboard=unnamedplus,exclude:cons\|linux

      On Ubuntu this worked exactly how it's described in `:help 'clipboard'`: the '*' register is used for yanks, deletes, changes, and puts. On OS X, however, I think I'm seeing a bug: it doesn't work for yanks (though it still works for deletes, changes, and puts.)

      I'm running Mavericks, and I've tested this with both terminal vim (iTerm2 + homebrew's build of vim) as well as MacVim. I've also tested it with `vim -u NONE --noplugin` to rule out any configuration issues.

      Does anybody have any suggestions, aside from pbcopy, visual-mode and/or mouse-based selection, or any esoteric re-mappings?

      ---

      Side note: it looks like there's a bug in the documentation, which I'm not sure how to best report: `:help clipboard-unnamedplus` says that I can check for availability via `if has('unnamedplus')`, and yet 'unnamedplus' is seemingly not a "feature", so it returns 0 for me.

      --
      --
      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.
    • Anton Backer
      I found a workaround: set clipboard=unnamedplus,unnamed,exclude:cons |linux If unnamed is also included, y yanks into as well as +. Nevertheless, this
      Message 2 of 3 , Feb 17, 2014
        I found a workaround:

        set clipboard=unnamedplus,unnamed,exclude:cons\|linux

        If 'unnamed' is also included, y yanks into "" as well as "+. Nevertheless, this behavior seems weird, and is definitely different from what I was seeing on linux.

        --
        --
        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.
      • Björn Winckler
        ... These are X11-specific features which is probably why its not working they way you expect and why has( unnamedplus ) returns 0. You may be able to
        Message 3 of 3 , Feb 28, 2014
          On Tue, Feb 18, 2014 at 1:40 AM, Anton Backer <olegov@...> wrote:
          > Has anybody here tried setting the 'clipboard' setting to 'unnamedplus' with good results?
          >
          > Here are my experiences, contrasted with what I've come to expect from my time on Ubuntu. I have the following in my .vimrc:
          >
          > " Default clipboard to "+
          > set clipboard=unnamedplus,exclude:cons\|linux
          >
          > On Ubuntu this worked exactly how it's described in `:help 'clipboard'`: the '*' register is used for yanks, deletes, changes, and puts. On OS X, however, I think I'm seeing a bug: it doesn't work for yanks (though it still works for deletes, changes, and puts.)
          >
          > I'm running Mavericks, and I've tested this with both terminal vim (iTerm2 + homebrew's build of vim) as well as MacVim. I've also tested it with `vim -u NONE --noplugin` to rule out any configuration issues.
          >
          > Does anybody have any suggestions, aside from pbcopy, visual-mode and/or mouse-based selection, or any esoteric re-mappings?
          >
          > ---
          >
          > Side note: it looks like there's a bug in the documentation, which I'm not sure how to best report: `:help clipboard-unnamedplus` says that I can check for availability via `if has('unnamedplus')`, and yet 'unnamedplus' is seemingly not a "feature", so it returns 0 for me.

          These are X11-specific features which is probably why its not working
          they way you expect and why "has('unnamedplus')" returns 0. You may
          be able to compile vim with the gtk gui to use them on OS X.

          Björn

          --
          --
          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.
        Your message has been successfully submitted and would be delivered to recipients shortly.