2 ms·
It's only even a problem if tabs and spaces are mixed; if EVERY level of indent were denoted by a tab then it wouldn't really matter if the default editor width
by mjevans 8y ago
It's only even a problem if tabs and spaces are mixed; if EVERY level of indent were denoted by a tab then it wouldn't really matter if the default editor width were 2, 4, or 8 or any other number as it would still be consistent in that editor.
- saagarjha 8y agoSpaces are only used for alignment at the very end, so the alignment should be consistent even when tab sizes are different because the base alignment, which is done with tabs, is the only thing that changes.
- RHSeeger 8y agoIf you're trying to align text, then even 2 would fail when the thing you're trying to align with is an odd number of characters (name of a method, etc).
- mjevans 8y agoAbsolute alignment and level of indent dependent code are two separate tasks. The former is a pre-formatted fixed-width character document that can only be viewed one way. The latter is a document which is easily processed; editors should show the intended logical representation of the information according to user preferences for conveying such meanings (though for terminal compatibility they often default to either 8 or 4 fixed width spaces in less powerful editors; still the meaning is conveyed clearly).