On Wed, Jul 05, 2017 at 09:55:06PM +0200, Martin Steigerwald wrote: > Dear Maintainer. > > I know of this: > > > Vim will load $VIMRUNTIME/defaults.vim if the user does not have a vimrc. > > This happens after /etc/vim/vimrc(.local) are loaded, so it will override > > any settings in these files. > But the settings in "defaults.vim" IMHO are just *completely* broken for > several reasons: > > 1) Maybe due to a bug in Vim regarding mouse handling with "set mouse=a" Vim > is just madly moving around the cursor and doing whatelse not for easily a > minute in a lot of freshly installed Debian 9 VMs accesses via SSH and screen > from Plasma´s Konsole terminal emulator.
These problems are more typically due to people/software setting incorrect values for $TERM and/or related options in Vim ('ttymouse', 'term', etc.). Vim can only act on the information it has, so when that's incorrect -- garbage in, garbage out. That being said, "set mouse=a" _is_ one setting I argued against upstream. I would encourage you to post your experiences and reasoning against that setting to v...@vim.org. I'd rather see this changed upstream instead of piecewise changing parts of defaults.vim. > 2) Activated mouse handling breaks copy and paste text from Plasma´s > clipboard > by… auto-indenting and what else not. I know of "set nopaste" (or what else > it > was called)… but having to activate it is an additional nuisance. This should actually behave better once I'm able to upload a newer version of Vim, since it knows how to use bracketed paste mode. > 3) Vim wordwraps by default now. I wonder about how many admins will break > config files with long lines accidently by that new default behaviour. I don't see anything in defaults.vim that changes 'textwidth' from its default value of 0, so I'm not sure what you're experiencing here. Maybe ":verbose set textwidth?" will help next time you run into this issue. > I think it is broken behaviour, that "defaults.vim" is loaded *after* > "vimrc.local". The sane default would be this order: > > 1. Global vim configuration > 2. /etc/vim/vimrc.local > 3. $HOME/.vimrc This _is_ the behavior. The _only_ way that defaults.vim is used is when $HOME/.vimrc doesn't exist. Note that /etc/vim/vimrc.local is a Debian-specific extension of the system-wide vimrc, to avoid conffile prompts during upgrades, so 1 & 2 are the same thing. defaults.vim is intentionally loaded _after_ $HOME/.vimrc so that Vim can choose not to load it when $HOME/.vimrc exists. The situation you're running into is that you don't have $HOME/.vimrc and therefore are having the system-wide values adjusted by defaults.vim. That behavior is the entire reason why I added documentation to /etc/vim/vimrc (which one has to read to know about vimrc.local) about how to deal with defaults.vim. Cheers, -- James GPG Key: 4096R/91BF BF4D 6956 BD5D F7B7 2D23 DFE6 91AE 331B A3DB