'unnamedplus' clipboard issue with homebrew vim

80 views
Skip to first unread message

Anton Backer

unread,
Feb 17, 2014, 7:40:38 PM2/17/14
to vim...@googlegroups.com
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.

Anton Backer

unread,
Feb 17, 2014, 11:45:14 PM2/17/14
to vim...@googlegroups.com
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.

Björn Winckler

unread,
Feb 28, 2014, 12:44:06 PM2/28/14
to vim...@googlegroups.com
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
Reply all
Reply to author
Forward
0 new messages