Auto copy the mouse selection
From Vim Tips Wiki
Tip 1154 • Previous Tip • Next Tip
Created: February 27, 2006 Complexity: basic Author: Anon Minimum version: 6.0 Karma: 26/8 Imported from: Tip#1154
With this tip, just selecting text with mouse in gvim, will copy that text to the clipboard for pasting into other applications (on Windows and on Xwindows, ala Xterms).
Put these commands in ~/.gvimrc
" Method 1 (for Xwindows and mswindows), this map is different from the one shown in vim documentation: :noremap <LeftRelease> "+y<LeftRelease> " Method 2 (works only on ms-windows vim63): :set guioptions=a
[edit] Comments
I suppose you meant vnoremap.
Also you want to use this (to just append the "a" to your options):
:set guioptions+=a
