aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2017-10-31 09:22:40 +1300
committerTom Ryder <tom@sanctum.geek.nz>2017-10-31 09:22:40 +1300
commit32e15afef9a50caf34b9b982738a215c7f66dbb1 (patch)
treec39baae67de2532d367237330a9aec224cf10bfb
parentRemove duplicated 'encoding' Vim configuration (diff)
downloaddotfiles-32e15afef9a50caf34b9b982738a215c7f66dbb1.tar.gz
dotfiles-32e15afef9a50caf34b9b982738a215c7f66dbb1.zip
Use clunkier, more compatible indent option reset
This method of re-setting the numeric indent local options to their global analogues looks a bit gross, but seems to work on much older versions of Vim (6.2 in this testing).
-rw-r--r--vim/indent/_GLOBAL.vim11
1 files changed, 5 insertions, 6 deletions
diff --git a/vim/indent/_GLOBAL.vim b/vim/indent/_GLOBAL.vim
index e3ba8e11..4461f36d 100644
--- a/vim/indent/_GLOBAL.vim
+++ b/vim/indent/_GLOBAL.vim
@@ -5,9 +5,8 @@ setlocal autoindent<
setlocal expandtab<
" Unfortunately, older versions of Vim (6.2 is known) accept neither the
-" `option<` nor `option=` syntax for resetting these numeric values.
-if v:version >= 700
- setlocal shiftwidth<
- setlocal softtabstop<
- setlocal tabstop<
-endif
+" `option<` nor `option=` syntax for resetting these numeric values, so we do
+" it this clunkier way.
+execute 'setlocal shiftwidth='.&g:shiftwidth
+execute 'setlocal softtabstop='.&g:softtabstop
+execute 'setlocal tabstop='.&g:tabstop