On 2016-09-03, Tony Mechelynck wrote:
> On Sat, Sep 3, 2016 at 4:25 AM, David Fishburn wrote:
> >
> > On Fri, Sep 2, 2016 at 4:24 PM, Christian Hesse wrote:
> >>
> >> Since version 7.4.2111 we load a less conservative defaults.vim file if
> >> ~/.vimrc is not found. These options can not be overwritten from global
> >> /etc/vimrc.
> >> For example the new defaults enable mouse integration. To disable mouse
> >> integration I have to create ~/.vimrc for every user. I can not disable
> >> mouse integration from /etc/vimrc.
> >>
> >> IMHO /etc/vimrc should have precedence to the default settings.
> >
> >
> > I second this on my *nix systems, I only create a vimrc (no .vimrc) so that
> > I get the same settings for each and every user on the machine.
> >
> > David
> >
> 
> /etc/vimrc is a filepathname used by several distros for the "system
> vimrc" (the default is $VIM/vimrc with no leading period).
> 
> That script is sourced long before Vim even looks for your own .vimrc,
> and therefore long before it even knows whether or not you have one —
> and whether or not defaults.vim should be sourced.

/etc/vimrc (or /usr/share/vim/vimrc) may be sourced before ~/.vimrc,
but that doesn't mean that the decision to source it has to be made
before the decision to source defaults.vim.

> I would expect defaults.vim to be sourced instead of your own vimrc
> (usually ~/.vimrc), and at the same point of startup.

Except that if a package maintainer or a system administrator wants
to provide standard settings for their users, the conventional means
to do that is to put those settings in /etc/vimrc or
/usr/share/vim/vimrc, which is sourced after vim has set its
hard-coded defaults.  As I understand it, defaults.vim is intended
to provide more useful default settings than the hard-coded
defaults, but in a way that doesn't mess up backwards compatibility
for users who have tuned their configurations around the hard-coded
defaults.  I would expect defaults.vim to be sourced as the very
first configuration file, but conditionally on the presence of
~/.vimrc.

> To get the same settings on all machines, compile Vim yourself, and
> leave the installdir at its default (/usr/local/ and its
> subdirectories) so that /etc/vimrc will be bypassed (the systyem vimrc
> being then /usr/local/share/vim/vimrc which can be left nonexistent).
> Then your own ~/.vimrc will be the first script sourced (#1 in the
> output of .scriptnames).

That's what I do as an individual user, because the results are
worth the extra effort.  I wouldn't expect a system administrator to
have to jump through those hoops simply to provide a consistent
editor environment for their users.  They should be able to rely on
the distribution's package update procedure to keep the Vim package
up to date; they should be able to simply provide a system
configuration file and not have their settings overridden by Vim.

Regards,
Gary

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Raspunde prin e-mail lui