LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (http://www.linuxquestions.org/questions/slackware-14/)
-   -   Middle-click pasting from X clipboard into vim in xterm doesn't work (http://www.linuxquestions.org/questions/slackware-14/middle-click-pasting-from-x-clipboard-into-vim-in-xterm-doesnt-work-4175463638/)

Stephen Morgan 05-27-2013 01:08 PM

Middle-click pasting from X clipboard into vim in xterm doesn't work
 
Going through different terminals, it works in terminator (terminator-0.96-x86_64-1sl), but not in Xterm (which I prefer), and not in terminology, xfce4-terminal, Konsole, aterm, nor rxvt. What makes it work in terminator I don't know.

It does work to paste into vi (or nano) through middle-click, just not through vim. Vim pastes from the internal clipboard rather than the X clipboard.

It also works through using Shift-Ins to paste. Just not middle click.

I just so happens that I prefer pasting through middle-click, and using vim and Xterm, the only combination that doesn't work.

san 05-27-2013 01:23 PM

try "set mouse=a" (or was it "set mouse=r"?)

if it works, save it in your ~./vimrc

Alien Bob 05-27-2013 03:07 PM

Try Shift-Middleclick.

Eric

Stephen Morgan 05-28-2013 01:18 AM

Quote:

Originally Posted by san (Post 4960011)
try "set mouse=a" (or was it "set mouse=r"?)

if it works, save it in your ~./vimrc

It's "r", and works, thanks.

Shift-middle click also works, but doing it one-handed on a laptop touchpad is slightly more difficult.

David the H. 05-28-2013 11:06 AM

It's generally more efficient to access the x-selection through the "*" register anyway. Use "*p to paste the contents into your current buffer, for example. The "+" buffer is similarly available for the clipboard.

T3slider 05-28-2013 04:16 PM

Quote:

Originally Posted by David the H. (Post 4960634)
It's generally more efficient to access the x-selection through the "*" register anyway. Use "*p to paste the contents into your current buffer, for example. The "+" buffer is similarly available for the clipboard.

Slackware's vim is compiled with --without-x, so "*p will only work in gvim and not regular vim (unless you recompile it).


All times are GMT -5. The time now is 06:28 PM.