diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2017-10-31 09:22:40 +1300 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2017-10-31 09:22:40 +1300 |
commit | 32e15afef9a50caf34b9b982738a215c7f66dbb1 (patch) | |
tree | c39baae67de2532d367237330a9aec224cf10bfb /vim/indent | |
parent | Remove duplicated 'encoding' Vim configuration (diff) | |
download | dotfiles-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).
Diffstat (limited to 'vim/indent')
-rw-r--r-- | vim/indent/_GLOBAL.vim | 11 |
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 |