aboutsummaryrefslogtreecommitdiff
path: root/vim/vimrc
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2018-01-21 23:39:36 +1300
committerTom Ryder <tom@sanctum.geek.nz>2018-01-21 23:39:36 +1300
commit680c5b2b58db2d6fea59de3443e38aa3dffe0914 (patch)
treef9ec628dab5549e5a996fce55428624e93a75b81 /vim/vimrc
parentMerge branch 'release/v0.24.0' (diff)
parentBump version number to 0.25.0 (diff)
downloaddotfiles-680c5b2b58db2d6fea59de3443e38aa3dffe0914.tar.gz
dotfiles-680c5b2b58db2d6fea59de3443e38aa3dffe0914.zip
Merge branch 'release/v0.25.0'v0.25.0
* release/v0.25.0: Bump version number to 0.25.0 Suspend 'C' from 'cpoptions' for sh syn extensions Join short-circuit line in detect_background.vim Break some continued lines in Vim indent files Remove 'mac' from 'fileformats' Tweak 'cpoptions' C flag instead of 'nocompatible' Remove a baseless assertion I made in a config Make entire syntax config dependent on load state Activate syntax settings conditionally
Diffstat (limited to 'vim/vimrc')
-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