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

Re: vim on Debian 12: How to disable the mouse GUI mode ?



On Mon, Jul 22, 2024 at 11:23:19 -0400, Justin Piszcz wrote:
> On Mon, Jul 22, 2024 at 11:20 AM Greg Wooledge <greg@wooledge.org> wrote:
> >
> > On Mon, Jul 22, 2024 at 17:08:15 +0200, Thomas Schmitt wrote:
> > > Since an upgrade from Debian 11 to 12 the vim command
> > >
> > >   :set mouse=
> > >
> > > does not disable the "GUI" interpretation of pasting text or numbers
> > > when vim is in normal mode [...]
> >
> > I'm not sure how you've got it configured, but just having a ~/.vimrc
> > file should be enough to disable the default system vimrc which has all
> > that broken mouse crap.
> >
> > Unless I've got another file somewhere that I've forgotten...?
> >
> 
> Not sure if related to the issue OP is having is the same but I had to
> add this to my ~/.vimrc:
> set mouse=v
> 
> More discussion about the mouse setting here:
> https://unix.stackexchange.com/questions/139578/copy-paste-for-vim-is-not-working-when-mouse-set-mouse-a-is-on

My apologies; my previous message was written hastily.  I didn't actually
test what Thomas was reporting.

Having now tested pasting with the mouse while in command mode, I can
confirm that I get the same behavior Thomas disliked.  It's simply not
something that I normally do, so I didn't notice it.

In my testing, I ran vim with no arguments, and typed in a single line
of gibberish.  Then, I moved the cursor to column 0.  Finally, I typed
out the command 20l in a different terminal, highlighted it, and pasted
it into vim.  Rather than moving my cursor 20 characters to the right,
it inserted the literal string "20l".  Specifically, it acts as if I
had pressed "i20lESC".  I began and ended in command mode, but command
text was inserted as if I had been in insert mode.

Doing :set mouse=v doesn't change this behavior, either.

Neither does any other mouse= mode that I've tried.  Even "mouse=h"
which according to the documentation is supposed to "make the mouse work
in help files only" doesn't fix it.

So, unfortunately I don't have any answers to contribute here.  All I
can give is a weak "me too".


Reply to: