From fb68ccf09e53f0f639db243259d3a3f1db64644d Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Tue, 18 Jun 2019 11:37:36 +1200 Subject: Have Vim respect POSIXLY_CORRECT --- vim/vimrc.stub.vim | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'vim') 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 -- cgit v1.2.3