3 ms·
No, it isn’t[1], not in most formatting styles, if we’re speaking about the usage where the user can adjust the tab width and have the formatting not fall apart
by mananaysiempre 4y ago
No, it isn’t[1], not in most formatting styles, if we’re speaking about the usage where the user can adjust the tab width and have the formatting not fall apart. (Note this excludes e.g. Vim or Visual Studioconfigured to use tabs, so that may be a part of the confusion.) The reason is that alignment still needs to be done with spaces:
TAB if (foo) {
TAB TAB bar(spam,
TAB TAB ....eggs);
TAB }
[1] https://www.emacswiki.org/emacs/SmartTabs https://www.emacswiki.org/emacs/SmartTabs
- jeltz 4y agoNone of what you wrote contradicts the comment you replied to.
- mananaysiempre 4y agoAh whoops, now I’m not sure. Either that comment was saying that with a standardized indentation width, having an option to adjust the indentation width does not matter, which is trivially true and not contradicted by mine but strange to say as a reply to a comment pointing out that option; or it was (implicitly?) saying that with a standardized indentation width in the storage format, you could recover the tabs from the spaces and adjust the result, which is contradicted by my comment: you can’t automatically distinguish indentation spaces and alignment spaces without at least language-syntax smarts, and while the former should be adjusted the latter mustn’t be.