summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdam Stankiewicz <sheerun@sher.pl>2020-10-23 01:16:32 +0200
committerAdam Stankiewicz <sheerun@sher.pl>2020-10-23 01:16:32 +0200
commit2522ad2029cb880552173cc5eb6a861b02a8799a (patch)
tree03f116fa478b7bfa4982180f7d33cfac8a43da1e
parent50a9a7345f8f9a9f81712554f42e9e62995d094f (diff)
downloadvim-polyglot-2522ad2029cb880552173cc5eb6a861b02a8799a.tar.gz
vim-polyglot-2522ad2029cb880552173cc5eb6a861b02a8799a.zip
Set softtabstop to -1 to allow easy sw configuraton
-rw-r--r--ftdetect/polyglot.vim7
1 files changed, 7 insertions, 0 deletions
diff --git a/ftdetect/polyglot.vim b/ftdetect/polyglot.vim
index 6d495073..f0146c74 100644
--- a/ftdetect/polyglot.vim
+++ b/ftdetect/polyglot.vim
@@ -2770,6 +2770,13 @@ if !has_key(s:disabled_packages, 'autoindent')
if shiftwidth > 0
setlocal expandtab
let &l:shiftwidth=shiftwidth
+ try
+ " Sunchronize tabstop with shiftwidth
+ let &l:softtabstop = -1
+ catch /^Vim\%((\a\+)\)\=:E487/
+ " -1 was not supported before Vim 7.4
+ let &l:softtabstop = a:num_spaces
+ endtry
let &l:softtabstop=shiftwidth
return 1
endif