On Sat, Sep 3, 2016 at 8:09 PM, Bram Moolenaar <[email protected]> wrote:
>
> Patch 7.4.2319
> Problem:    No way for a system wide vimrc to stop loading defaults.vim.
>             (Christian Hesse)
> Solution:   Bail out of defaults.vim if skip_defaults_vim was set.
> Files:      runtime/defaults.vim

Well, well well... Myself, I never put much trust in "system vimrc
files", and OTOH I rely on several settings which used to be in
vimrc_example.vim and are now in defaults.vim. My own-compiled Vim
loads his from /usr/local/share/vim/vimrc (which doesn't exist) rather
than /etc/vimrc (used by the distro) but this prompted me (just in
case, y'know) to add

if exists('skip_defaults_vim')
  unlet skip_defaults_vim
endif

in my .vimrc, immediately before

source $VIMRUNTIME/vimrc_example.vim

thus intentionally defeating what I call "misguidedly
well-intentioned" system administrators like Christian Hesse and Gary
Fishburn, who would want to use a system vimrc in order to prevent the
defaults.vim from loading.

I must say to Christian and Gary's defense that apparently they didn't
intend this mechanism to be used in the presence of a ~/.vimrc. I
suppose that their system vimrc's will have to use

if !filereadable('~/.vimrc')
  let skip_defaults_vim = 1
endif

wrapping the disabling of defaults.vim within a (negative) test for
the existence (and readability) of ~/.vimrc, but I don't trust that no
sysadmin will be misguided enough do do away with the test.


Best regards,
Tony.

-- 
-- 
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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Raspunde prin e-mail lui