diff options
author | Adam Stankiewicz <sheerun@sher.pl> | 2020-09-09 19:08:17 +0200 |
---|---|---|
committer | Adam Stankiewicz <sheerun@sher.pl> | 2020-09-09 19:08:17 +0200 |
commit | 4f7a4036eb4f4d64fa5f30e55f23fbb0de4680dc (patch) | |
tree | f2e4dc42d502efa192ea2987b501b851191006fb /ftdetect | |
parent | 0ff5d451b0079f5be723276007cfbcc3d1fd06ca (diff) | |
download | vim-polyglot-4.9.6.tar.gz vim-polyglot-4.9.6.zip |
Finally fix issues with tab detection, #541v4.9.6
Diffstat (limited to 'ftdetect')
-rw-r--r-- | ftdetect/polyglot.vim | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/ftdetect/polyglot.vim b/ftdetect/polyglot.vim index c13df516..a7f808e6 100644 --- a/ftdetect/polyglot.vim +++ b/ftdetect/polyglot.vim @@ -1872,13 +1872,13 @@ if !has_key(s:disabled_packages, 'autoindent') if line[0] == "\t" setlocal noexpandtab + let &shiftwidth=&tabstop let b:sleuth_culprit .= ':' . i return 1 elseif line[0] == " " let indent = len(matchstr(line, '^ *')) if (indent % 2 == 0 || indent % 3 == 0) && indent < minindent let minindent = indent - let b:sleuth_culprit .= ':' . i endif endif endfor @@ -1886,6 +1886,7 @@ if !has_key(s:disabled_packages, 'autoindent') if minindent < 10 setlocal expandtab let &shiftwidth=minindent + let b:sleuth_culprit .= ':' . i return 1 endif @@ -1971,6 +1972,9 @@ endfunc autocmd VimEnter * call s:verify() +set sw=3 +set ts=8 + " restore Vi compatibility settings let &cpo = s:cpo_save unlet s:cpo_save |