Remix.run Logo
SAI_Peregrinus a day ago

But an editor can just as well let the user choose what width to display spaces at the start of a line. Nothing forces them to be the same width as spaces in the middle of a line.

eviks 17 hours ago | parent | next [-]

Nope, an editor can do that, but it can’t do it just as well because not all spaces at the beginning are indentation, so then you need to have more complicated rules to differentiate between those cases

em-bee a day ago | parent | prev | next [-]

which editor does that? space width is defined by the font, and normally you use monospace fonts. i am unfamiliar with any editor that allows you to choose a different font for spaces. besides, it would only work for indents, it would mess up any alignment of code into columns.

SAI_Peregrinus a day ago | parent [-]

None, but it's clearly possible to add since such handling is already present for tabs in almost any editor. I merely mean that there's no technical restriction.

efilife 19 hours ago | parent [-]

But this option already exists for tabs that are pretty much built for this purpose. It's like adding a fifth wheel to a car because there's no technical restriction even though 4 work fine

eikenberry a day ago | parent | prev [-]

But don't fixed width fonts, which many consider the best for code, mean fixed width spaces too?

SAI_Peregrinus a day ago | parent [-]

If that were the case tabs would be fixed width too. But they're not. There's no fundamental reason tabs have to be the only variable-width character.

eikenberry a day ago | parent [-]

Tabs would only be variable in the number of spaces uses, but those spaces will be fixed width.

jononor 11 hours ago | parent [-]

And spaces could be variable in the number of "sub-spaces" used. Each could be say 1/8 of a regular space.