Skip to content

Commit

Permalink
Allow 6-spaces indent and do not set tabstop if changed
Browse files Browse the repository at this point in the history
  • Loading branch information
sheerun committed Oct 19, 2020
1 parent fbeca0e commit ad2df97
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions ftdetect/polyglot.vim
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit ad2df97

Please sign in to comment.