4 ms·
Surely, one logical space of variable width is a tab? I prefer spaces to tabs - but if one makes concessions to readability like variable-width fonts - it's tim
by e12e 9y ago
Surely, one logical space of variable width is a tab? I prefer spaces to tabs - but if one makes concessions to readability like variable-width fonts - it's time to bring back tabs, too? (I do think this is a good idea, but "before" spaces won, in no small part because pre high-resolution screens, I think monospace was the better choice. With high dpi comes pretty layout - also of code).
- teddyh 9y agoThe solution: Elastic Tabstops (http://nickgravgaard.com/elastic-tabstops/ http://nickgravgaard.com/elastic-tabstops/)
- ActsJuvenile 9y agoThis is awesome - thank you!
- Stratoscope 9y agoFor me the low DPI vs. high DPI displays didn't make a difference. I've been using proportional fonts ever since the days of very low DPI displays and still like them now that I only use high DPI displays. The key to using proportional fonts is to stop using column alignment and use only indentation instead. There's an illustration of this in the rustfmt code I posted elsewhere in this thread. And you're right, once you abandon column alignment, there's no longer any reason to prefer spaces over tabs, so you can take advantage of the other benefits of tabs.
- pugworthy 9y agoThe catch is, if I try to work with code relying on special stuff, and I don't have your special font, or special extension, etc. your code will look terrible. Consider for any of these ideas (and the idea of various fonts) just how well it would work for the masses. Consider the mess if someone works on an open source project and checks in a bunch of code formatted for this. Which is why I guess I'd see any kind of "fancy" spacing or even proportional fonts to be a real problem in an organization or structure where potentially many people, or new people over time, will have to work with the code.