Bug#864074: defaults.vim: broken configuration
Martin Steigerwald
martin at lichtvoll.de
Wed Jul 19 21:38:40 UTC 2017
James, did you intend to send this just to me? To be on safe side, I reply to
you only, but I really think this should also go to the bug report.
James McCoy - 18.07.17, 20:21:
> On Sat, Jul 08, 2017 at 11:36:07PM +0200, Martin Steigerwald wrote:
> > James McCoy - 05.07.17, 21:09:
[…]
> > My order wasn´t complete. I think it should be:
> >
> > 1. Global vim configuration
> > 2. /etc/vim/vimrc.local
> > 3. $HOME/.vimrc
> > 4. defaults.vim
> >
> > so that defaults.vim can only ever set any setting that has *not* been set
> > by any of the other configuration files.
>
> Then you would actually want defaults.vim to be first, so that anything
> else set overrides it. You can do exactly that by putting this in your
> /etc/vim/vimrc.local:
>
> " Explicitly source defaults.vim so you can override its settings
> source $VIMRUNTIME/defaults.vim
> " Prevent it from being loaded again later if the user doesn't have
> " a vimrc
> let skip_defaults_vim = 1
And all that just to restore some sanity to the VIM configuration… well…
> > It is completely unintuitive that defaults.vim overwrites settings in
> > vimrc.local by default. If I write "set mouse=" in there, I mean it. I
> > really dislike software that pretends it knows better than me unless I
> > tell that software to stop that behavior.
> >
> > Never *ever* overwrite user/admin made settings.
>
> Yes, that was another part that Bram just punted on when he was deciding
> how defaults.vim would work.
I may look at a vim fork that doesn´t adopt this nonsense.
> > > 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.
> >
> > Alternatively vim should not load defaults.vim if vimrc.local exists I
> > think.
> /etc/vim/vimrc is the only thing Vim knows about. It just happens to
> have a snippet at the end which sources /etc/vim/vimrc.local.
>
> If anything, I'll add a commented out version of the code I posted
> above to /etc/vim/vimrc. I thought this sort of stuff would be easily
> figured out for people that wanted to customize the behavior, but
> apparently I was wrong.
This is… I already use "let skip_defaults_vim = 1". I found this before
already, and I think apt-listchanges showed me your update to NEWS.Debian.
But the issue with this is: Now by default the VIM configuration is *broken* in
several ways which I described on *every* newly installed *or* upgraded Debian
system. Which needs adapting the configuration every newly installed system.
For *what* benefit?
Well, I bet I´d need to file an issue with upstream about that.
Thanks,
--
Martin
More information about the pkg-vim-maintainers
mailing list