9 ms·
The optimal mechanism is to indent with tabs, and align with spaces (that is, you have the same number of preceding tabs as whatever you're trying to align with
by jbri 13y ago
The optimal mechanism is to indent with tabs, and align with spaces (that is, you have the same number of preceding tabs as whatever you're trying to align with, and then use spaces from there).
Though setting your editor up to do that automatically is an incredible pain, and it kind of forces you to use a monospace font.
- Locke1689 13y agoAh, I didn't see the distinction between "indent" and "align." Anyway, it seems like this system necessitates that the leading white space on a given line must be a mixture of both tab characters (\t) and spaces, unless one sets their editor to insert space characters as tabs (which is standard), and is obviously living in a state of sin.
- sesqu 13y agoOn every line that is right-aligned, yes. Most lines would have only tabs.
- XorNot 13y agoWho isn't using a monospace font for code editing? I didn't even realize this was a thing.
- jbri 13y agoThe primary reason people use monospace fonts is historical inertia. It's definitely worth trying out a proportional font if your environment is amenable to it (some tools don't cope particularly well, for sad and disappointing reasons).
- 10098 13y agoI tried doing that. It looks uglier than Sloth from the Goonies.
- ufo 13y agoIIRC, Stroustoup uses a non-monospaced font in his C++ book.
- deleted 13y ago[deleted]