Set softtabstop to -1 to allow easy sw configuraton

This commit is contained in:
Adam Stankiewicz
2020-10-23 01:16:32 +02:00
parent 50a9a7345f
commit 2522ad2029

View File

@@ -2770,6 +2770,13 @@ if !has_key(s:disabled_packages, 'autoindent')
if shiftwidth > 0 if shiftwidth > 0
setlocal expandtab setlocal expandtab
let &l:shiftwidth=shiftwidth 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 let &l:softtabstop=shiftwidth
return 1 return 1
endif endif