Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines
Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.
REPEAT: Do NOT report bugs for outdated packages!
https://wiki.archlinux.org/title/Bug_reporting_guidelines
Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.
REPEAT: Do NOT report bugs for outdated packages!
FS#12783 - vi and vim VISUAL mode should not be default
Attached to Project:
Arch Linux
Opened by Rob (p3nguin) - Wednesday, 14 January 2009, 03:03 GMT
Last edited by Allan McRae (Allan) - Saturday, 31 January 2009, 08:58 GMT
Opened by Rob (p3nguin) - Wednesday, 14 January 2009, 03:03 GMT
Last edited by Allan McRae (Allan) - Saturday, 31 January 2009, 08:58 GMT
|
DetailsDescription:
The default settings of vi and vim cause VISUAL mode to be enabled when using the mouse. Other distros have commented out the section in /etc/virc and /etc/vimrc to stop this unwanted behavior from happening. Please comment out the lines related to the mouse in those config files. Global enabling of the mouse should not be default. Additional info: * package version(s) - all * config and/or log files etc. - /etc/virc /etc/vimrc Steps to reproduce: Open a text file using vi or vim (such as executing `crontab -e`) and highlight some text with the mouse. VISUAL mode will become enabled. To permanently correct the global behavior: in /etc/virc and /etc/vimrc, change: " In many terminal emulators the mouse works just fine, thus enable it. if has('mouse') set mouse=a endif to " In many terminal emulators the mouse works just fine, thus enable it. "if has('mouse') " set mouse=a "endif |
This task depends upon
Closed by Allan McRae (Allan)
Saturday, 31 January 2009, 08:58 GMT
Reason for closing: Not a bug
Additional comments about closing: Default upstream configuration. Override with ~/.vi{m}rc
Saturday, 31 January 2009, 08:58 GMT
Reason for closing: Not a bug
Additional comments about closing: Default upstream configuration. Override with ~/.vi{m}rc
if has('mouse')
set mouse=v
endif
Does that achieve the same thing? It is an easier fix to sed...
v is visual mode, which is what needs to be avoided. According to the vim documentation, the mouse setting should be empty by default. I'm not sure why the newer vimrcs have included enabling of mouse.
first of all, when enabled and selecting text, it selects only relevant text, not line numbers. I would deem as that correct behaviour.
Secondly, it is default behaviour in vimrc, as such desired by upstream authors. Thirdly, it activates other very useful features, such as mouse scrolling in vim(scrolling the text buffer rather than the terminal). So why should selecting text with the mouse should not activate the visual mode, which is basically vims version of selecting text. Selecting text with the mouse does nothing else than exactly that, selecting text.
This behaviour changed a while ago. Old versions of vi/vim on archlinux didn't have this option enabled by default.
How many people use vi/vim on a regular basis without a vimrc file? This can easily be overridden there. It also seems odd to me that upstream would ship a config they didn't stand behind using.
So I would prefer to leave it the way it is.