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.
diff --git a/src/main.c b/src/main.c
index 926b8ab..f24bda2 100644
--- a/src/main.c
+++ b/src/main.c
@@ -2997,11 +2997,14 @@
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 @@
* 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.