Thursday, September 30, 2010

How to configure vim to use the mouse, AND to copy and paste

Hi,

I have questions regarding vim and how to enable the mouse in it. There were some other threads about that issue, but I could not find a solution for my problem.

I would like to have the following actions enabled in vim:

1. To go to some place, I click the left mouse key
2. To copy text TO the vim editor by using the middle-click of the mouse, (text which I have marked before in some other window (browser, emacs, xterm))
3. To copy text FROM the vim editor, by selecting the text with the left mouse button (left-click, hold down, select text, release left button), so I can paste it to somwehere else with the mouse middle button
4. To copy text and paste TO and FROM vim 

I have the following content of my .vimrc:

:set mouse=r
:set selectmode+=mouse

With that configuration, the points 2-4 are working.
When I change mouse=r to mouse=a, then points 1 AND 3 are working, but I have to press the shift key in addition. But I cannot use the mouse to go somewhere else in vim.

A suggestion was to use mouse=ar, but this enable only the first point.

So how is it possible to configure vim to use all four points 1-4?


Thanks
Alex

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

No comments: