Vim can copy or paste to the X clipboard or the desktop clipboard. This is useful to copy text from Vim to an external application or vice versa. This is also useful to copy and paste between multiple instances of Vim running in different terminals.
This capability is available in Vim only if it has been compiled with the
+clipboard feature. With this feature, the doublequote-plus register
"+ of Vim is connected to the desktop clipboard. Anything you cut, copy or yank to this register appears in the system clipboard. If you paste from this register in Vim, then the text in the clipboard appears at the paste location.
To copy to system clipboard, visually mark the text and type:
To paste from system clipboard:
Note that Vim may be copying everything you visually mark to clipboard by default. This is because most Vim builds have the autoselect feature turned on. This autoselect feature can be disabled if you wish to.
This feature just does not work on some systems for me. I have resorted to using xclip to copy and paste between Vim and desktop clipboard.
Tried with: Vim 7.4 and Ubuntu 16.04