From 2522ad2029cb880552173cc5eb6a861b02a8799a Mon Sep 17 00:00:00 2001 From: Adam Stankiewicz Date: Fri, 23 Oct 2020 01:16:32 +0200 Subject: Set softtabstop to -1 to allow easy sw configuraton --- ftdetect/polyglot.vim | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'ftdetect') 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 -- cgit v1.2.3