aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2019-06-18 11:37:36 +1200
committerTom Ryder <tom@sanctum.geek.nz>2019-06-18 11:37:36 +1200
commitfb68ccf09e53f0f639db243259d3a3f1db64644d (patch)
tree832f286c4e1294db3fbe76d4546c833015e0283f
parentAdd vic(1df) (diff)
downloaddotfiles-fb68ccf09e53f0f639db243259d3a3f1db64644d.tar.gz
dotfiles-fb68ccf09e53f0f639db243259d3a3f1db64644d.zip
Have Vim respect POSIXLY_CORRECT
-rw-r--r--vim/vimrc.stub.vim6
1 files changed, 6 insertions, 0 deletions
diff --git a/vim/vimrc.stub.vim b/vim/vimrc.stub.vim
index 1d8d3d9a..b5763f16 100644
--- a/vim/vimrc.stub.vim
+++ b/vim/vimrc.stub.vim
@@ -1,3 +1,9 @@
+" If POSIXLY_CORRECT is defined in the environment, we'll start compatible if
+" we're not already planning to do so.
+if exists('$POSIXLY_CORRECT') && !&compatible
+ set compatible
+endif
+
" If we have non-tiny Vim version >=7, source real vimrc; this works because
" tiny and/or ancient builds of Vim quietly ignore all code in :if blocks
if v:version >= 700 && !&compatible