diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2019-05-25 02:31:16 +1200 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2019-05-25 02:31:16 +1200 |
commit | ce2f2fd10e0938c2e613820402fa8db14fc2cb26 (patch) | |
tree | 984e0b6d0f418fbebe67e67c4b493dbeb51769dd | |
parent | Add filename pattern without period for viminfo (diff) | |
download | dotfiles-ce2f2fd10e0938c2e613820402fa8db14fc2cb26.tar.gz dotfiles-ce2f2fd10e0938c2e613820402fa8db14fc2cb26.zip |
Use ternary logic for 'softtabstop' setting
-rw-r--r-- | vim/vimrc | 13 |
1 files changed, 6 insertions, 7 deletions
@@ -12,13 +12,12 @@ set autoindent " Use indent of previous line on new lines set expandtab " Use spaces instead of tabs set shiftwidth=4 " Indent with four spaces -" Make a tab key in insert mode add the same number of spaces as 'shiftwidth' -if v:version > 703 " Can use negative value as reference to &shiftwidth - \ || v:version == 703 && has('patch693') - set softtabstop=-1 -else - let &softtabstop = &shiftwidth -endif +" Make insert mode tab key add the same number of spaces as 'shiftwidth', use +" negative value to do this if Vim new enough to support it +let &softtabstop = + \ v:version > 703 || v:version == 703 && has('patch693') + \ ? -1 + \ : &shiftwidth " Restore insert mode 'backspace' limits to the stringent Vim default, if a " system vimrc or Neovim has messed with it |