• lemmyng@lemmy.ca
    link
    fedilink
    English
    arrow-up
    3
    arrow-down
    2
    ·
    8 months ago

    The whole reason nearly all the spaces guys do 4 spaces is cause that’s the nearly universal tab width.

    That is provably wrong. The default tab width in vim is 8 spaces, and the default indentation in yaml is two spaces.

    • Traister101@lemmy.today
      link
      fedilink
      arrow-up
      1
      arrow-down
      1
      ·
      edit-2
      8 months ago

      What’s yaml have to do with anything? It’s like python with syntactic whitespace which is unrelated to this discussion. The Tab vs Space debate is entirely around non syntactic whitespace which doesn’t effect how the code is parsed. And yes Python technically does both tabs and spaces but it’s all sorts of fucky.

      Terminal editors while still used a ton aren’t really what I was referring to. Newer terminal editors such as Helix have tab width configured per language most of which default to a width of 4 spaces but toml/yaml both default to 2 spaces. I was mainly referring to GUI editors as frankly that’s just what most people use nowadays. JetBrains IDEs, Visual Studio, Eclipse, VS Code, Notepad++ were primarily what I was thinking of as I’ve used all of them and they all default to a tab width of 4 hence why I said nearly universal. Also I said nearly terminal editors being the only editors I’ve used that don’t default to a width of 4 seems like a fair usage of the term.