View previous topic :: View next topic |
Author |
Message |
alex.blackbit Advocate
Joined: 26 Jul 2005 Posts: 2397
|
Posted: Fri Nov 06, 2009 10:28 pm Post subject: vim in xterm with "set mouse=a" and system clipboa |
|
|
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 |
|
|
sera Retired Dev
Joined: 29 Feb 2008 Posts: 1017 Location: CET
|
Posted: Fri Nov 06, 2009 10:38 pm Post subject: |
|
|
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 |
|
|
alex.blackbit Advocate
Joined: 26 Jul 2005 Posts: 2397
|
Posted: Fri Nov 06, 2009 11:13 pm Post subject: |
|
|
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 |
|
|
sera Retired Dev
Joined: 29 Feb 2008 Posts: 1017 Location: CET
|
Posted: Sat Nov 07, 2009 7:04 am Post subject: |
|
|
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 |
|
|
|