aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--vim/vimrc16
1 files changed, 14 insertions, 2 deletions
diff --git a/vim/vimrc b/vim/vimrc
index 5d195427..18363956 100644
--- a/vim/vimrc
+++ b/vim/vimrc
@@ -1,5 +1,10 @@
-" Don't try to be vi-compatible, even if invoked as ex or with -u specified
-set nocompatible
+" If we're in compatible mode, ensure that the 'C' option that disallows line
+" continuations is stripped out, as they're heavily used in this
+" configuration for readability; we'll put it back later
+if &compatible
+ let s:cpoptions_save = &cpoptions
+ set cpoptions-=C
+endif
" Use different keys for global and local leaders
if has('eval')
@@ -29,3 +34,10 @@ if v:version >= 701
silent! colorscheme sahara
endif
endif
+
+" If we're in compatible mode, put 'cpoptions' back the way we found it at the
+" start of this configuration, even though it's the current year
+if exists('s:cpoptions_save')
+ let &cpoptions = s:cpoptions_save
+ unlet s:cpoptions_save
+endif