diff options
author | Adam Stankiewicz <sheerun@sher.pl> | 2020-12-29 20:33:47 +0100 |
---|---|---|
committer | Adam Stankiewicz <sheerun@sher.pl> | 2020-12-29 20:33:47 +0100 |
commit | c5625ffedd61a01de1399afef6fbcd31f5cda72f (patch) | |
tree | 64c5da2fb873fc64ce168aa5657b178f293654e7 /ftdetect | |
parent | 45f2f9497524486bfc3f7651c1fb2111737aa206 (diff) | |
download | vim-polyglot-c5625ffedd61a01de1399afef6fbcd31f5cda72f.tar.gz vim-polyglot-c5625ffedd61a01de1399afef6fbcd31f5cda72f.zip |
Set shiftwidth to tabstop if greather, fixes #648
Also should fix situations like in #654
Diffstat (limited to 'ftdetect')
-rw-r--r-- | ftdetect/polyglot.vim | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/ftdetect/polyglot.vim b/ftdetect/polyglot.vim index a8a5c319..ac934d53 100644 --- a/ftdetect/polyglot.vim +++ b/ftdetect/polyglot.vim @@ -2678,6 +2678,10 @@ if !has_key(g:polyglot_is_disabled, 'autoindent') let &tabstop = 2 endif + if &shiftwidth > &tabstop + let &shiftwidth = &tabstop + endif + let s:default_shiftwidth = &shiftwidth func! s:get_shiftwidth(indents) abort |