summaryrefslogtreecommitdiff
path: root/runtime
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2016-09-03 20:08:56 +0200
committerBram Moolenaar <Bram@vim.org>2016-09-03 20:08:56 +0200
commitb07a82b6d5f904ed3e623e775c3458adb1cc0a3e (patch)
tree8adb761bb223181da7781df64131549a2b862e8e /runtime
parent349e7d94e6bbb253bb87adad9039f095128ab543 (diff)
downloadvim-git-b07a82b6d5f904ed3e623e775c3458adb1cc0a3e.tar.gz
patch 7.4.2319v7.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.
Diffstat (limited to 'runtime')
-rw-r--r--runtime/defaults.vim8
1 files changed, 7 insertions, 1 deletions
diff --git a/runtime/defaults.vim b/runtime/defaults.vim
index 2460fd8c3..43ff1e0fb 100644
--- a/runtime/defaults.vim
+++ b/runtime/defaults.vim
@@ -1,7 +1,7 @@
" The default vimrc file.
"
" Maintainer: Bram Moolenaar <Bram@vim.org>
-" Last change: 2016 Aug 28
+" Last change: 2016 Sep 02
"
" This is loaded if no vimrc file was found.
" Except when Vim is run with "-u NONE" or "-C".
@@ -13,6 +13,12 @@ if v:progname =~? "evim"
finish
endif
+" Bail out if something that ran earlier, e.g. a system wide vimrc, does not
+" want Vim to use these default values.
+if exists('skip_defaults_vim')
+ finish
+endif
+
" Use Vim settings, rather than Vi settings (much better!).
" This must be first, because it changes other options as a side effect.
set nocompatible