2 ms·
The only way this gets adopted is if it degrades gracefully to existing editors and tooling. This only works, obviously, with a well-behaved whitespace model:
by ben509 8y ago
The only way this gets adopted is if it degrades gracefully to existing editors and tooling.
This only works, obviously, with a well-behaved whitespace model: pure spaces or 8-spaced tabs.
I can see a few ways to do this:
1. The editor deduces elastic tabs by observing where text lines up.
2. Augment #1 with knowledge of the lexical structure (same complexity as a syntax highlighter) to deduce where it ought to line up.
3. Use invisible characters to identify tab-stops. (Repurpose vertical tab, maybe? Or a zero-width char?)
4. Use an external file to store tab-stops. (At which point you can name your tab stops.)
5. A 'prettifier' utility can use parsing knowledge to generate 3 or 4.