7

Archived link.

I think this is a good read to learn about what tabs and tabstops really are regardless of whether you agree that tabstops should be at different positions per line or with the controversial idea of using proportional fonts (this would work with monospaced fonts too).

you are viewing a single comment's thread
view the rest of the comments
[-] in2erval@kbin.social 1 points 1 year ago

In some of my personal code I liked to have used it (in very specific circumstances, like having many similar-sized parameter declarations e.g. protobuf), but as you said the lack of support means that a lot of code formatters simply trim unnecessary spaces so they never stick around.

What's more, I am still yet to find a consistent rule about when to apply this kind of formatting - the example in the article shows one for method args but it just doesn't look good at all. Key-value lists (like maps) might be a good place to use it, but if one key ends up being very long you have a ton of unnecessary space, so I would need to "group" together similar-length keys to make it aesthetically pleasing:

const map = {
  foo:    1,
  bar:    2,
  bazbar: 3,

  // I don't want the keys above to be spaced to match this key
  someExtremelyLongKeyname: 4
}

this post was submitted on 20 Jun 2023
7 points (100.0% liked)

Programming

17028 readers
596 users here now

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you're posting long videos try to add in some form of tldr for those who don't want to watch videos

Wormhole

Follow the wormhole through a path of communities !webdev@programming.dev



founded 1 year ago
MODERATORS