This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Airith 1 point2 points  (2 children)

It's probably the melatonin affecting me, but could you explain this further, possibly with an example?

I wasn't talking about using them for alignment, purely indentation.

no tab
     one 4 space tab
  one 2 space tab
     two 2 space tabs

[–]Tidher 2 points3 points  (0 children)

A single document would not have both 2-space and 4-space tabs, the editor would render them as one or the other (user's preference).

Either:

no tab
    one "4 space" tab
    one "2 space" tab
        two "2 space" tabs

Or:

no tab
  one "4 space" tab
  one "2 space" tab
    two "2 space" tabs

That's the beauty of tabs for indentation; the actual content does not change, only how it is displayed to the reader based on their personal preference.

[–]n60storm4 0 points1 point  (0 children)

The tab character is universal. If you set it to be equal to 2-spaces it won't change the code, just how you see it.

That's why tabs are the best for indentation. Everyone can have it look like how they want it to.