diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2018-06-22 21:12:33 +1200 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2018-06-22 21:12:33 +1200 |
commit | dc24c30618aa6b1162c5759ee46611babaa03026 (patch) | |
tree | 79014880611d18f7bf4cacdc0bac9d19d08bf10c /vim | |
parent | Revise Vim 'shiftround' comment (diff) | |
download | dotfiles-dc24c30618aa6b1162c5759ee46611babaa03026.tar.gz dotfiles-dc24c30618aa6b1162c5759ee46611babaa03026.zip |
Use negative Vim 'softtabstop' value
From :help 'softtabstop':
> When 'sts' is negative, the value of 'shiftwidth' is used.
From :help version7.txt:
> Patch 7.3.693
> Problem: Can't make 'softtabstop' follow 'shiftwidth'.
> Solution: When 'softtabstop' is negative use the value of 'shiftwidth'.
Diffstat (limited to 'vim')
-rw-r--r-- | vim/vimrc | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -33,7 +33,14 @@ set autoindent " Use indent of previous line on new lines set expandtab " Use spaces instead of tabs set shiftround " Round indenting to multiples of 'shiftwidth' set shiftwidth=4 " Indent with four spaces -set softtabstop=4 " Insert four spaces for a Tab press + +" Spaces to insert on Tab key press; if supported, use negative value to +" mirror 'shiftwidth' +if v:version > 703 || v:version == 703 && has('patch693') + set softtabstop=-1 +else + set softtabstop=4 +endif " Let me backspace over pretty much anything set backspace= |