I am using gVim on Ubuntu 10.10. I want to copy (yank) text to the system clipboard, so that the copied text is available in other applications.
This works with \"
I have the very same idea as you, but I did it for years.
nnoremap yy yy"+yy
vnoremap y ygv"+y
Note that now yy
command does two things: First it yank to register as normal, and then it yank to "
register (system clipboard). The y
command does the same thing. This is because I want to keep the multiple clipboard functionality of Vim.
For pasting from system clipboard, I used to have noremap gp "+p
(global pasting), but now I use the excellent plugin Yankring.