Sublime Forum

Tabs and indents

#1

Unfortunately confuses tabs and indents, which makes it not useful on some existing code bases. It would be really great if these could be separately set.

0 Likes

#2

To disambiguate… this refers to the problem of working with older code written on ascii editors whose tab stop (hardcoded by the editor) may be different from the indent level of the code (I mean who would indent by 8 space just because their tab stop is 8… that makes things insanely hard to read).

So you are left with this situation:

  • Set your tab stop to 8… then auto indent and the tab button, which usually advances by an indent, do the wrong thing for you
  • Set your tab stop to 3… now the old code is a formatting nightmare

Of course there are slightly time consuming workarounds (converting the old tabs to spaces every time you load a file), but they also involve ensuring no one else edits the same files with the old settings, which is why I really wish for editors that allow the interpretation of \t for display purposes to differ from what the auto indent (including the tab key) do. Scite does this, for example. Requires “tab key and auto indents insert spaces, not \t” setting of course.

0 Likes