diff options
author | Adam Stankiewicz <sheerun@sher.pl> | 2020-10-19 09:10:39 +0200 |
---|---|---|
committer | Adam Stankiewicz <sheerun@sher.pl> | 2020-10-19 09:10:57 +0200 |
commit | ad2df97a644fd3bbddd5314a37c24c91bdd3b427 (patch) | |
tree | c6bda1e6d425c7d0ec6630348ba34986bd19746e | |
parent | fbeca0ed90a84dab705719fa3788391d88716b98 (diff) | |
download | vim-polyglot-ad2df97a644fd3bbddd5314a37c24c91bdd3b427.tar.gz vim-polyglot-ad2df97a644fd3bbddd5314a37c24c91bdd3b427.zip |
Allow 6-spaces indent and do not set tabstop if changed
-rw-r--r-- | ftdetect/polyglot.vim | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/ftdetect/polyglot.vim b/ftdetect/polyglot.vim index 5bb1bc76..c4b0d720 100644 --- a/ftdetect/polyglot.vim +++ b/ftdetect/polyglot.vim @@ -2722,7 +2722,7 @@ if !has_key(s:disabled_packages, 'autoindent') return 1 elseif line[0] == " " let indent = len(matchstr(line, '^ *')) - if indent < minindent && index([2, 3, 4, 8], indent) >= 0 + if indent < minindent && index([2, 3, 4, 6, 8], indent) >= 0 let minindent = indent endif endif @@ -2731,7 +2731,9 @@ if !has_key(s:disabled_packages, 'autoindent') if minindent < 10 setlocal expandtab let &l:shiftwidth=minindent - let &l:tabstop=minindent + if &tabstop == 8 + let &l:tabstop=minindent + endif let b:sleuth_culprit .= ':' . i return 1 endif |