3 ms·
> you could have your editor insert the trailing space automatically (perhaps with exceptions for cases like function(<tab>arguments)), then manually delete the
by eviks 3y ago
> you could have your editor insert the trailing space automatically (perhaps with exceptions for cases like function(<tab>arguments)), then manually delete the space in the cases where you don't want whitespace between table columns
That's just as bad, manual fiddling is precisely what autoformatting algorithms are supposed to solve. Especially in the more painful cases of tables. Also, inserting many spaces in large tables is a rather costly operation, I have to use debouncing in the current elastic tabstops plugins that align with spaces to avoid that cost on every keypress. Also, you're asking to differentiate between the two invisibles (tabs and spaces), that would require making one of them visible, but then in many cases that visibility would be legal and thus just visual noise
> you could very reasonably have a single escape sequence that sets a minimum padding for all the columns present on the current line;
You can't do that since in many languages these sequences would be invalid input
> my concern is to make the format able to express general layouts, not to make it maximally compressed
Yet your format can't do that without a lot of manual fiddling
> manually adjusting tabstops is only an adequate replacement for a general string representation for nested tabular text layouts in a few niche special cases like a single developer looking at their own code
This also works in such niche special case as non-code editing
- kragen 3y agoif a format supports layouts with space between columns and layouts without, you do need some user-interface action ("manual fiddling") to choose between them, whatever the default is if you only support one of the two options, it's true that you don't need that user-interface action, but that's not because it requires less manual fiddling to achieve the same result; it's because it can only achieve the result that the more expressive format could achieve without manual fiddling, while the other option becomes impossible instead of fiddly and that's true regardless of whether the fiddling-free option has the extra spacing or lacks it you seem to have been responding to an earlier edition of my comment, by the way, because your response no longer makes sense in context because i already clarified some things you misunderstood; i mention this partly in case other people are puzzled as to what you are talking about i didn't realize you'd implemented elastic tabstops yourself! which editors did you write it for? i don't agree that relayout of a large table with new column widths is an inherently expensive operation (in the absence of word wrap) but i can easily believe that there are software environments that make it so