On Fri, Sep 9, 2016 at 1:14 PM, Bram Moolenaar <[email protected]> wrote:
>
> Christian Brabandt wrote:
>
>> here is a small update to the documentation that mentions how to skip
>> loading the defaults.vim file
>>
>> diff --git a/runtime/doc/starting.txt b/runtime/doc/starting.txt
>> index 14a5f01..2142343 100644
>> --- a/runtime/doc/starting.txt
>> +++ b/runtime/doc/starting.txt
>> @@ -1030,6 +1030,14 @@ If you don't like some of the defaults, you can still 
>> source defaults.vim and
>>  revert individual settings.  See the defaults.vim file for hints on how to
>>  revert each item.
>>
>> +                                                       *skip_defaults_vim*
>> +If you want to skip loading the defaults.vim file, you can set the variable
>> +skip_defaults_vim in your |.vimrc| like this >
>> +    :let g:skip_defaults_vim = 1
>> +<
>> +Note: This must be done in a script that is actually loaded before the 
>> defaults.vim
>> +file is read |initialization|
>> +
>
> That's a bit misleading, since when Vim finds a .vimrc file it won't
> load the defaults.  Thus this really only applies to a system vimrc
> file.  I have this now:
>
>                                                 *skip_defaults_vim*
> If you use a system-wide vimrc and don't want defaults.vim to change settings,
> set the "skip_defaults_vim" variable.
>
>

Note that this will disable defaults.vim _in all cases_, even when
sourced by vimrc_example.vim or directly by .vimrc. I would put an
example after the above paragraph, like this:

Example:
    if !(filereadable('~/.vimrc') || filereadable('~/_vimrc') ||
filereadable(expand("$VIM/_vimrc")))
        let skip_defaults_vim = 'skip'
    endif

> --
>     "You mean there really is an answer?"
>     "Yes! But you're not going to like it!"
>     "Oh do please tell us!"
>     "You're really not going to like it!"
>     "but we MUST know - tell us"
>     "Alright, the answer is...."
>     "yes..."
>     "... is ..."
>     "yes... come on!"
>     "is 42!"
>                 (Douglas Adams - The Hitchhiker's Guide to the Galaxy)
>
>  /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
> ///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
> \\\  an exciting new programming language -- http://www.Zimbu.org        ///
>  \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

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