Re:What's the deal with tab size (8 spaces) in the GitHub UI?
by kazinator on Thursday September 23, 2021 @12:11PM
(#28631175)
To clarify, I do not have a problem; I'm simply revealing the existence of certain requirements in the wild.
The 1960's tab modeled after typewriter tab stops is not up to snuff to these requirements.
You fall back on spaces, and then you have a half-baked result where only some of the indentation scales with the tab size.
I suspect that a successful solution will not involve tabs at all. It's algorithmically possible for the text presentation tool, such as the editor, to infer which spaces are indentation and which are alignment, informed by the language syntax, and then allow the indentation spaces to have a configurable size.
I posited that if tabs had simple expansion semantics (tab produces fixed number of spaces starting at any position) that would also be workable. Unfortunately, it requires integration into way too many tools all at the same time.
The 1960's tab modeled after typewriter tab stops is not up to snuff to these requirements.
You fall back on spaces, and then you have a half-baked result where only some of the indentation scales with the tab size.
I suspect that a successful solution will not involve tabs at all. It's algorithmically possible for the text presentation tool, such as the editor, to infer which spaces are indentation and which are alignment, informed by the language syntax, and then allow the indentation spaces to have a configurable size.
I posited that if tabs had simple expansion semantics (tab produces fixed number of spaces starting at any position) that would also be workable. Unfortunately, it requires integration into way too many tools all at the same time.