this post was submitted on 02 May 2025
8 points (68.2% liked)

Git

3236 readers
4 users here now

Git is a free and open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency.

Resources

Rules

  1. Follow programming.dev rules
  2. Be excellent to each other, no hostility towards users for any reason
  3. No spam of tools/companies/advertisements. It’s OK to post your own stuff part of the time, but the primary use of the community should not be self-promotion.

Git Logo by Jason Long is licensed under the Creative Commons Attribution 3.0 Unported License.

founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
[–] Colloidal 19 points 3 days ago* (last edited 3 days ago) (9 children)

It makes me sad we didn't collectively agree on using tabs for all indentation so people can set their preferred indentation size in their editors.

That said, consistency trumps philosophy.

[–] pohart 11 points 3 days ago (5 children)

I don't understand even a little how spaces won.

[–] FizzyOrange 2 points 2 days ago (1 children)

IMO it's because open source developers commonly use editors that have poor support for tabs, like Vim and Emacs.

Tabs are definitely better but to use them properly you do really need a "visualise whitespace" option enables. Emacs does it like this and Vim like this. Both awful.

Possibly also a bit because tabs for indentation, alignment for spaces is just too complex for most developers. Hell most can barely even get spaces right. I work in a couple of languages without an autoformatter (e.g. SystemVerilog) and some of our files are a joke. A mixture of 2 and 3 space indentations, sometimes on the same line!

[–] BatmanAoD 2 points 1 day ago* (last edited 1 day ago)

Every single time I've tried to work on a file using tabs, I've had to configure my tabstop to be the same width the original author used in order to make the formatting reasonable. I understand that in theory customizable tabstops is preferable, but I've yet to see it work well.

(For what it's worth, I think that elastic tabstops, had they been the way tabs worked in text files to begin with, would have been far preferable.)

load more comments (3 replies)
load more comments (6 replies)