Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
vim in xterm with "set mouse=a" and system clipboard
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
alex.blackbit
Advocate
Advocate


Joined: 26 Jul 2005
Posts: 2395

PostPosted: Fri Nov 06, 2009 10:28 pm    Post subject: vim in xterm with "set mouse=a" and system clipboa Reply with quote

hi,

i use vim since ages and just discovered the "set mouse=a" feature. very handy.
but there is one drawback. text that is selected with the mouse in the vim window does not end up in the system clipboard.
that means i cannot paste it in e.g. a second xterm by pressing the middle mouse button.
can i tell vim somehow to copy selected text in the system clipboard ?
i read about that "* register stuff, but it does not work for me.
anybody with more success ?
Back to top
View user's profile Send private message
sera
Developer
Developer


Joined: 29 Feb 2008
Posts: 979
Location: CET

PostPosted: Fri Nov 06, 2009 10:38 pm    Post subject: Reply with quote

Coping with the middle mouse button across xterms works fine here. What does not work is from a xterm to a gnome-terminal but the other way around just fine.

Looks random to me.
Back to top
View user's profile Send private message
alex.blackbit
Advocate
Advocate


Joined: 26 Jul 2005
Posts: 2395

PostPosted: Fri Nov 06, 2009 11:13 pm    Post subject: Reply with quote

thanks for your answer, but i am not sure if you got me right.
copy/paste works correctly in all kinds of terms, including from vim windows.
it only does _not_ work if i do "set mouse=a" in vim.
Back to top
View user's profile Send private message
sera
Developer
Developer


Joined: 29 Feb 2008
Posts: 979
Location: CET

PostPosted: Sat Nov 07, 2009 7:04 am    Post subject: Reply with quote

alex.blackbit wrote:
thanks for your answer, but i am not sure if you got me right.
copy/paste works correctly in all kinds of terms, including from vim windows.
it only does _not_ work if i do "set mouse=a" in vim.


The following I have tested and works for me:
Quote:
Copy/paste with the mouse and Visual mode ('mouse' option must be set, see
above):
1. Press left mouse button on first letter of text, move mouse pointer to last
letter of the text and release the button. This will start Visual mode and
highlight the selected area.
2. Press "y" to yank the Visual text in the unnamed register.
3. Click the left mouse button at the insert position.
4. Click the middle mouse button.


:help mouse-using for a complete manual.
You know of :help clipboard, right?
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum