Imported Upstream version 8.0.586
[platform/upstream/vim.git] / runtime / defaults.vim
index 43ff1e0..6fd43db 100644 (file)
@@ -1,7 +1,7 @@
 " The default vimrc file.
 "
 " Maintainer:  Bram Moolenaar <Bram@vim.org>
-" Last change: 2016 Sep 02
+" Last change: 2017 Apr 12
 "
 " This is loaded if no vimrc file was found.
 " Except when Vim is run with "-u NONE" or "-C".
@@ -21,7 +21,16 @@ 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
+" Avoid side effects when it was already reset.
+if &compatible
+  set nocompatible
+endif
+
+" When the +eval feature is missing, the set command above will be skipped.
+" Use a trick to reset compatible only when the +eval feature is missing.
+silent! while 0
+  set nocompatible
+silent! endwhile
 
 " Allow backspacing over everything in insert mode.
 set backspace=indent,eol,start