4 ms·
> Why are you doing character-based right-alignment in a LTR script? It's not right-aligned, I've aligned the "." method accessors, ";" statement delimeters, e
by chriswarbo 10y ago
> Why are you doing character-based right-alignment in a LTR script?
It's not right-aligned, I've aligned the "." method accessors, ";" statement delimeters, etc. into the same column, and treated "else {" as a single token.
It would be even nicer to align the two pairs of statements more directly, but that ends up overflowing 80 characters, e.g.
if( foo == bar ) { if( baz == moo ) { console.log( "yes" ); this.that = true ; }
else { console.log( "no" ); this.that = false; } }
> It breaks with proportional fonts
Proportional fonts break many "in-band" layout schemes; e.g. ASCII-art layout used in plaintext email. I think "out of band" layout schemes, like CSS, would be overkill for code layout; and certainly more effort to implement than making the editor manipulate ASTs instead of character streams.