Change default tab width to 4
This commit is contained in:
parent
b6347df737
commit
4a5da51152
@ -28,7 +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 your `'tabstop'`. Otherwise, a `'tabstop'` of 8 is enforced.
|
||||
set to your `'tabstop'`. Otherwise, a `'tabstop'` of 4 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.
|
||||
|
@ -15,7 +15,7 @@ function! s:guess(lines) abort
|
||||
let podcomment = 0
|
||||
let triplequote = 0
|
||||
let backtick = 0
|
||||
let softtab = repeat(' ', 8)
|
||||
let softtab = repeat(' ', 4)
|
||||
|
||||
for line in a:lines
|
||||
if !len(line) || line =~# '^\s*$'
|
||||
@ -79,7 +79,7 @@ function! s:guess(lines) abort
|
||||
elseif heuristics.soft != heuristics.hard
|
||||
let options.expandtab = heuristics.soft > heuristics.hard
|
||||
if heuristics.hard
|
||||
let options.tabstop = 8
|
||||
let options.tabstop = 4
|
||||
endif
|
||||
endif
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user