0
0
mirror of https://github.com/vim/vim.git synced 2025-09-25 03:54:15 -04:00

patch 7.4.2111

Problem:    Defaults are very conservative.
Solution:   Move settings from vimrc_example.vim to defaults.vim.  Load
            defaults.vim if no .vimrc was found.
This commit is contained in:
Bram Moolenaar
2016-07-28 22:24:15 +02:00
parent eac784eced
commit 8c08b5b569
14 changed files with 243 additions and 122 deletions

View File

@@ -2997,11 +2997,14 @@ source_startup_scripts(mparm_T *parmp)
DOSO_VIMRC) == FAIL
#endif
&& process_env((char_u *)"EXINIT", FALSE) == FAIL
&& do_source((char_u *)USR_EXRC_FILE, FALSE, DOSO_NONE) == FAIL)
{
&& do_source((char_u *)USR_EXRC_FILE, FALSE, DOSO_NONE) == FAIL
#ifdef USR_EXRC_FILE2
(void)do_source((char_u *)USR_EXRC_FILE2, FALSE, DOSO_NONE);
&& do_source((char_u *)USR_EXRC_FILE2, FALSE, DOSO_NONE) == FAIL
#endif
)
{
/* When no .vimrc file was found: source defaults.vim. */
do_source((char_u *)VIM_DEFAULTS_FILE, FALSE, DOSO_NONE);
}
}
@@ -3009,7 +3012,7 @@ source_startup_scripts(mparm_T *parmp)
* Read initialization commands from ".vimrc" or ".exrc" in current
* directory. This is only done if the 'exrc' option is set.
* Because of security reasons we disallow shell and write commands
* now, except for unix if the file is owned by the user or 'secure'
* now, except for Unix if the file is owned by the user or 'secure'
* option has been reset in environment of global ".exrc" or ".vimrc".
* Only do this if VIMRC_FILE is not the same as USR_VIMRC_FILE or
* SYS_VIMRC_FILE.