You are not logged in.
Hi everyone,
I'm not really a vim expert, but I'm using it very often. I changed from Gentoo Linux to ArchLinux a few years ago. I'm also using Ubuntu a lot for my workstations.
Some time ago, vim's behaviour on my ArchLinux systems started to become weird; you can see what I describe in the following in this screencast: https://www.youtube.com/watch?v=rEOOPvkJS4Q.
Somehow vim reacts to mouse interaction in the console window in X. Former, I could (double-)click on texts, mark areas by draging the cursor over, right click it to copy, etc.
With current vim in ArchLinux, these clicks seem to be grabbed by vim somehow. It the switches it's mode to "visual", marked text isn't put into the mouse buffer for middle-click-paste, and right click moves the carret for the marked text instead showing a context menu.
When I switch the mouse to mode "c" (commandline) by ":set mouse=c", it behaves as expected. But when I add the following line to /etc/vimrc this seems to have no effect at all:
set mouse=c
So I have to set the mode manually for every vim session, currently. Why that - what am I doing wrong?
There is no ~/.vimrc file present.
Offline
You can have a look with ':set mouse' what the used value is. I've never heard of 'mouse=c', but I'm always using 'set mouse=' in my vimrc.
Also have a look on the ':version' output. It'll print all the files sourced by vim, make sure that your /etc/vimrc is sourced.
Offline
Yeah, add the following to ~/.vimrc
set mouse-=aOffline
Offline
You can have a look with ':set mouse' what the used value is. I've never heard of 'mouse=c', but I'm always using 'set mouse=' in my vimrc.
Also have a look on the ':version' output. It'll print all the files sourced by vim, make sure that your /etc/vimrc is sourced.
See http://vimdoc.sourceforge.net/htmldoc/options.html#'mouse' for info about the c mode.
Your hint with having a look into output of :version is helpful. /etc/vimrc is in that list.
Yeah, add the following to ~/.vimrc
set mouse-=a
What does that -= notation do?
Offline
The 'a-=b' notation is shorthand for 'a = a - b', like the more familiar '+=' notation. ![]()
Settings in Vim are represented by lists, not strings (or at least this one is), so you can use this notation to remove "a" from the list of things "mouse" is defined as.
Managing AUR repos The Right Way -- aurpublish (now a standalone tool)
Offline
With the help of Scimmia's Github Link for patch 7.4.2111, I conclude that there's nothing specific to be entered into /etc/vimrc or ~/.vimrc - creating an empty ~/.vimrc file solves this "issue". I'm naming it "issue", since it seems to confuse others, too, when you study the commit comments.
Last edited by DerJudge (2016-12-12 09:35:50)
Offline
DerJudge, your conclusion is what is already documented in the wiki page that Scimmia already linked to.
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Online