History Report a problem
Article Edit this page Discussion

Auto copy the mouse selection

From Vim Tips Wiki

Jump to: navigation, search
 

Tip 1154Previous TipNext 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

Rate this article:

Share this article:

Hubs Highlights International Sites Wikia messages
Entertainment
Gaming
Cartoons & Comics
Science Fiction
Hobbies
Sports
See all...
Grand Theft Auto
Doctor Who
Legend of Zelda Wiki
Terminator Wiki
Everquest II Wiki
Mystery Science Theater 3000
German
Spanish
Chinese
Japanese
More...
Wikia is hiring for several open positions
Send this article to a friend
"Auto copy the mouse selection"
 
 
Hi!

I thought you'd like this page from Wikia!

http://vim.wikia.com

Come check it out!
Send confirmation