Revert "Use shiftwidth 0 instead of copying tabstop"
This reverts commit b6b4c3b237678f1214ea2eca0e3e50eaafb30e3a. Closes #25.
This commit is contained in:
parent
00348fd88b
commit
b867ffac83
@ -28,8 +28,7 @@ then simply copy and paste:
|
||||
the first file in a brand new Ruby project might very well be derived from
|
||||
your `.irbrc`. I consider this a feature.
|
||||
* If your file is consistently indented with hard tabs, `'shiftwidth'` will be
|
||||
set to 0 so that `'tabstop'` is used. Otherwise, a `'tabstop'` of 8 is
|
||||
enforced.
|
||||
set to your `'tabstop'`. Otherwise, a `'tabstop'` of 8 is enforced.
|
||||
* The algorithm is rolled from scratch, fairly simplistic, and only lightly
|
||||
battle tested. It's probably not (yet) as good as [DetectIndent][].
|
||||
Let me know what it fails on for you.
|
||||
|
@ -67,11 +67,7 @@ function! s:guess(lines) abort
|
||||
endfor
|
||||
|
||||
if heuristics.hard && !heuristics.spaces
|
||||
if exists('*shiftwidth')
|
||||
return {'expandtab': 0, 'shiftwidth': 0}
|
||||
else
|
||||
return {'expandtab': 0, 'shiftwidth': &tabstop}
|
||||
endif
|
||||
return {'expandtab': 0, 'shiftwidth': &tabstop}
|
||||
elseif heuristics.soft != heuristics.hard
|
||||
let options.expandtab = heuristics.soft > heuristics.hard
|
||||
if heuristics.hard
|
||||
|
Loading…
x
Reference in New Issue
Block a user