Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #210997

buster changes vim mouse behavior again...

From Dave Sherohman <dave@sherohman.org>
Newsgroups linux.debian.user
Subject buster changes vim mouse behavior again...
Date 2019-07-08 15:50 +0200
Message-ID <yhCbL-7eo-3@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View raw


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

Back to linux.debian.user | Previous | Next — Next in thread | Find similar | Unroll thread


Thread

buster changes vim mouse behavior again... Dave Sherohman <dave@sherohman.org> - 2019-07-08 15:50 +0200
  Re: buster changes vim mouse behavior again... Andrei POPESCU <andreimpopescu@gmail.com> - 2019-07-08 20:00 +0200
    Re: buster changes vim mouse behavior again... Dave Sherohman <dave@sherohman.org> - 2019-07-09 09:30 +0200
      Re: buster changes vim mouse behavior again... Andrei POPESCU <andreimpopescu@gmail.com> - 2019-07-10 07:00 +0200

csiph-web