Closed software-opal closed 1 year ago
Hi @leesdolphin - thank you very much for getting in touch.
This is an interesting approach but i fear besides of the fact that this isn't how the editorconfig-values are currently applied Atom does unfortunately not support the differentiation between indentation and intra-line tabs.
Currently indent_size
and tab_width
fall back to each other if one isn't defined and since Atom does not differentiate between both, we're just setting the tab length and character.
So it looks there is a Issue open on Atom to separate the tab-character-width and the indent. But it appears to have dropped off the radar: https://github.com/atom/atom/issues/12931
I’ve just found out that setting indent_size or tab_width to 3 (or any value really) makes the indent/width one more (4).
# .editorconfig:
# This file is for unifying the coding style for different editors and IDEs
# editorconfig.org
root = true
[*]
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = false
indent_style = tab
indent_size = 3
# Show state of .editorconfig:
end_of_line | \n
-- | --
charset | utf8
indent_style | tab
indent_size/ tab_width | 3
insert_final_newline | false
trim_trailing_whitespace | true
max_line_length | auto
I use Atom 1.26.0 x64 on Xubuntu 17.10 AMD64.
Closing as Atom is abandoned.
I'm working on a project that uses 2-space indentation for code blocks, however uses tab indentation for intra-line indentation which uses 8-character-width tab characters.
Example code:
I've set up the editor config as follows:
However the code that is displayed in Atom is(replacing tabs with spaces to show incorrect indentation):
My understanding of the spec is that the
tab_width
setting should change the length of tabs to be(in this case) 8.Installed packages