[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

buster changes vim mouse behavior again...



Last time around, stretch changed mouse behavior in vim by setting
"mouse=a" by default.  To deal with this, my checklist for stretch
updates/installs includes

---
vi /etc/vim/vimrc.local
:set mouse=
:set paste
O
" Don't silently ignore these settings in favor of those in default.vim
let g:skip_defaults_vim = 1

" Middle-mouse should paste from X clipboard, NOT vim clipboard!
set mouse=
---

I copy (mouse highlight)/paste (middle-click) the first line into my
terminal, manually type the first `:set mouse=`, and then copy/paste the
rest of it.

Works great in stretch.

Today I did a test install of buster, however, and found a new problem:
It seems that buster's vim detects the middle-click and "helpfully" goes
immediately into insert mode, meaning that ":set paste" and "O" are
entered as part of the file contents rather than being processed as
commands.

I suppose that's handy for simple cases like this, where I ultimately am
just inserting text into a file, but I also frequently want to run the
same command in vim on a couple dozen different files, so it's really
handy to be able to paste commands into the vim window and have the
command executed instead of being inserted into the file's content.

So how do I bring back the old behavior?

In addition to ":set mouse=", I've also tried ":set ttymouse=" and
":set sessionoptions-=terminal", but these had no effect on this
behavior.



Crossposting notice:  I have also posted this question on the vi/vim
stack exchange site at
https://vi.stackexchange.com/questions/20548/allow-pasting-into-all-modes-not-just-insert

-- 
Dave Sherohman


Reply to: