LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 09-29-2010, 09:36 AM   #1
alex170872
LQ Newbie
 
Registered: Oct 2008
Posts: 18

Rep: Reputation: 0
Question vim: How to configure 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, I mark the text first in some other window (browser, emacs, xterm) and then I middle-click (or shift-middle click).
3. To copy text FROM the vim editor, I select the text (left-click, hold down, select text, release left button) and then paste the text to somewhere else via the middle button
4. The same as (3) but TO the vim editor itself.

I have the following content of my .vimrc:

:set number
:set mouse=r
:set selectmode+=mouse
:behave xterm

With that configuration, the points 2-4 are working.
When I change mouse=r to mouse=a, then 1 AND 3 is working, where I have to press the shift key in addition to press the middle mouse button.

My question: How to enable all pieces 1-4, and at best without having the shift-key pressed down to be able to paste text? How should my .vimrc look like?


Thanks
Alex

P.S. emacs is not a solution since I am working remotely over a large distance and the network is not suitable to have an emacs session opened at the remote pc.
 
Old 09-29-2010, 09:54 AM   #2
sem007
Member
 
Registered: Nov 2006
Distribution: RHEL, CentOS, Debian Lenny, Ubuntu
Posts: 638

Rep: Reputation: 113Reputation: 113
try a and r option it might help you.

Code:
:set mouse=ar
Regards,
 
Old 09-30-2010, 02:35 AM   #3
alex170872
LQ Newbie
 
Registered: Oct 2008
Posts: 18

Original Poster
Rep: Reputation: 0
Hi,

your suggestion does not work. I have now the following .vimrc:

:set number
:set mouse=ar
:set selectmode+=mouse

and it looks that only point (1) of my list does work. I cannot copy text from/to the vim editor.

Any other ideas I can try?


Thanks
Alex
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Can't copy-paste from one terminal to another using vim cola Slackware 11 12-18-2009 10:51 PM
copy-paste in vim proNick Linux - Newbie 5 02-17-2008 07:29 PM
How to copy paste into VIM ? EAD Linux - Software 15 12-12-2006 06:38 PM
Buggy copy n paste with vim in terminal Kovacs Slackware 1 09-05-2006 12:13 AM
cygwin vim copy/paste problem takahaya Linux - Software 2 03-31-2006 01:16 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 08:43 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration