News for hackers. Stuff that matters.
Re:Vim Clutch – A hardware pedal for improved text editing (... by chrisper on Sunday March 11, 2018 @12:26PM (#16563573)
I hate how different vim behaves on Debian compared to other distros.

Right click paste? Nope. On Debian it changes to visual mode.

Re:Vim Clutch – A hardware pedal for improved text editing (... by JoshMnem on Sunday March 11, 2018 @01:54PM (#16563992)
> On Debian it changes to visual mode.

If you put this in your .vimrc, it should allow you to paste from the system clipboard by pressing space-p:

    let g:mapleader = "\<Space>"
    nmap <leader>p "*p
    vmap <leader>p "*p
(Or use `"*p` or `"+p`, not including the backticks.)
Re:Vim Clutch – A hardware pedal for improved text editing (... by u801e on Sunday March 11, 2018 @02:17PM (#16564091)
That will only work if the xterm_clipboard feature is enabled at compile time with vim.

Edit:

s/clipbaord/clipboard/

Re:Vim Clutch – A hardware pedal for improved text editing (... by JoshMnem on Sunday March 11, 2018 @05:12PM (#16564819)
Oh, I'm not sure how it works on regular Debian. I'm using Ubuntu and it works out of the box here. I'm using neovim now, but it works with regular vim from the package manager too.
Re:Vim Clutch – A hardware pedal for improved text editing (... by u801e on Sunday March 11, 2018 @06:32PM (#16565088)
You can try running:

    :version
within vim to see what compile time features are enabled or disabled. If the list says +xterm_clipboard, then that feature is enabled.

In my experience, terminal vim doesn't have that feature enabled, but gvim does.

Re:Vim Clutch – A hardware pedal for improved text editing (... by u801e on Sunday March 11, 2018 @02:13PM (#16564070)
I've always used the + register to copy or paste text in vim (if X11 is enabled). Otherwise, I'll use xclip to handle interfacing with the clipboard.

    :w !xclip -selection clipboard
or

    :r !xclip -o -selection clipboard
Re:Vim Clutch – A hardware pedal for improved text editing (... by chrisper on Sunday March 11, 2018 @03:32PM (#16564387)
Hmm. I don't think that works over ssh?
Re:Vim Clutch – A hardware pedal for improved text editing (... by u801e on Sunday March 11, 2018 @04:02PM (#16564506)
You may have to use the -display parameter though the man page for xclip says that it will use the value of $DISPLAY by default. You will also need to enable X11 forwarding over ssh with the -X parameter or with the ForwardX11 option in the ssh config file.
Re:Vim Clutch – A hardware pedal for improved text editing (... by zargon on Sunday March 11, 2018 @10:49PM (#16565924)
This has nothing to do with what distro you are using, except perhaps what termcap information it has. If vim detects that the terminal can support mouse input, then it will enable mouse features. If not, vim does not get control over mouse input and your terminal provides default mouse behavior (right-click paste). You can disable mouse features with the command ":set mouse -=a". If you're pasting into vim from a terminal, you may also be interested in the "set paste" command.
Re:Vim Clutch – A hardware pedal for improved text editing (... by nickez on Sunday March 11, 2018 @12:51PM (#16563688)
That seems unrelated to vim. Doesn't it depend on your terminal if right click will paste? Try Shift right click and see if it pastes like you expect.
Re:Vim Clutch – A hardware pedal for improved text editing (... by chrisper on Sunday March 11, 2018 @03:30PM (#16564371)
But it works fine in Ubuntu. I am SSHing into both and they behave differntly.
Re:Vim Clutch – A hardware pedal for improved text editing (... by dsr_ on Sunday March 11, 2018 @01:07PM (#16563764)
This is a recent misfeature. The solution is set mouse=""
Re:Vim Clutch – A hardware pedal for improved text editing (... by chrisper on Sunday March 11, 2018 @03:30PM (#16564374)
Thanks!
Re:Vim Clutch – A hardware pedal for improved text editing (... by gcthomas on Sunday March 11, 2018 @01:41PM (#16563917)
I use Vim on Debian Testing, and right-click paste works fine on Gnome Terminal and Konsole, but does visual mode like you find in Xterm or UXterm.