I understand that you are set up with the features necessary for copy and pasting with the system clipboard, but I want to be a tad redundant as those registers can be a tad challenging to set up. It's all about the features that are enabled with your install of Vim. In OS X and Linux, the clipboard feature needs to be enabled, and Linux usually also requires the xterm_clipboard setting. You can tell if these are set by running vim --version
and seeing if there is a +
or -
for on or off respectively next to the feature name. There are notes on how to do this with OS X here, and Ubuntu here. There is also a nice summary of this information on a blog here.
According to this superuser post, macvim (and most likely gvim in general) will (assuming the clipboard is set up properly) automatically copy selections into the system clipboard if set guioptions+=a
is set. This seems to be the key to working with X's selection buffer. Quickly viewing the Vim documentation on guioptions, putting set guioptions+=a
should do as you desire for gVim. For more info check out this post by Carpetsmoker here.
For console Vim I found this article on how to disable what you are after... it seems that putting the following in your .vimrc
will result in happy days:
set clipboard += autoselect
For me, this successfully copied visual selections into the +
register.
:set guioptions+=a
. This is enabled by default on X11 systems (copies to PRIMARY)"