Precedence of tab-stop configuration #5813
Unanswered
Alhadis
asked this question in
Other Feature Feedback, Questions, & Ideas
Replies: 2 comments 7 replies
|
...why can't users just adjust their preference to make the code look readable to them? Your assumption that the repo only sets a tab-size when absolutely needed -- and that it's reasonable -- is a strong one that's probably not true everywhere. The user, however, can always be trusted to set the tab size to what they prefer. Again, that is the whole point of using tabs. If a repo really wants to force their preference, they can just use spaces. |
5 replies
|
I have noticed that the |
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
First of all, thank you so much for finally supporting configurable tab-widths on GitHub. I've noticed that the previous kludge of using EditorConfig to configure tab-sizes no longer works. Granted, this was an unwelcome hack that forced many GitHub users—myself included—into setting an
indent_sizeeven for projects that use semantic indentation (as the browser default of 8 columns bothered many folks).Regardless, forcing a specific tab-size is necessary or desirable in certain situations, such as when dealing with tabular data or legacy codebases that assume tabs will always be 8 columns wide (particularly common in C, old-style FORTRAN, and some assembly dialects). The chief benefit of using tabs is that everybody can read code at the indentation size they're most comfortable with. This added readability goes out the window if the file isn't indented semantically. For example, Apollo 11's source code becomes unreadable to users whose tab-size preference is anything other than 8.
On the topic of file-specific tab-widths, it'd be great if GitHub honoured Emacs and Vim modelines in addition to the EditorConfig approach. The order of precedence should be:
tab_widthorindent_sizeproperties (unless set to the value oftab,tab_widthshould take priority overindent_size)Ideally, authors shouldn't have to specify a tab-stop size (since this defeats the purpose of using tabs in the first place). But if they do, it should be assumed it's for a good reason.
All reactions