6 ms·
I hate how different vim behaves on Debian compared to other distros. Right click paste? Nope. On Debian it changes to visual mode.
by chrisper 9y ago
I hate how different vim behaves on Debian compared to other distros.
Right click paste? Nope. On Debian it changes to visual mode.
- nickez 9y agoThat 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.
- chrisper 9y agoBut it works fine in Ubuntu. I am SSHing into both and they behave differntly.
- dsr_ 9y agoThis is a recent misfeature. The solution is set mouse=""
- chrisper 9y agoThanks!
- gcthomas 9y agoI 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.
- JoshMnem 9y ago> 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.)
- u801e 9y agoThat will only work if the xterm_clipboard feature is enabled at compile time with vim. Edit: s/clipbaord/clipboard/
- JoshMnem 9y agoOh, 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.
- u801e 9y agoYou 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.
- u801e 9y agoI'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
- chrisper 9y agoHmm. I don't think that works over ssh?
- u801e 9y agoYou 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.
- zargon 9y agoThis 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.