9
HAlex
7y

People sometimes scream to everyone else that tabs are better than spaces, but they don't realize that their IDE most of the times automatically converts tabs in 4 spaces.

Comments
  • 1
    @Alice if your ide converts it by default this doesn't apply:
    You press tab -> you get 4 spaces
    You press backspace -> these 4 spaces will be removed.
    Add simple as that
  • 1
    @Alice TBH I am pro spaces (because of the way they are visualized in the same identical way everywhere) but I don't kill myself pressing the space bar 4 times!
  • 1
    @HAlex I prefer tabs because every single person can have the indentation size set for themselves.
    CSS is indented with a tabsize of 3 spaces
    HTML is indented with a tabsize of 3 spaces
    JSON with tabs of 2 spaces
    And anything else with tabs of 4 spaces.

    Im simply talking about indentation and not alignment (even though every tab indenter does it that way its still misunderstood by those space indenters).
  • 0
    @Codex404 I didn't know about the first 2, weird, 3 spaces? What!?? I've always used 4 spaces...
  • 1
    @Codex404 ok I've made a quick research, 4/4 say "use 2 spaces" for HTML and CSS
  • 2
    @HAlex for HTML I think 4 is way to much and 2 is not enough for clarity. But there are devs that always prefer 4 so thats why so many tab indenters love tabs.

    Personal preference over forced indentation size.
  • 2
    @HAlex yeah 2 and 4 are most common but I was like why not do odd and go odd :)
  • 0
    @Codex404 got it, I find using 4 spaces in HTML great for understanding the blocks but bad if the file is longer than 20 lines.
    I should probably use less spaces, thanks for the suggestion
  • 1
    Btw on github ive setup everything two 2 tabs to see everything better because of the small code window.
  • 2
    @Alice no one uses the space key to indent. That's fucking stupid.
Add Comment