Elastic tabstops

Tony Balinski ajbj at free.fr
Fri Jul 14 11:01:48 CEST 2006


Quoting Thomas Orgis <thomas-forum at orgis.org>:

> Am Thu, 13 Jul 2006 10:10:00 -0400
> schrieb Tony Balinski <ajbj at free.fr>:
>
> > Don't leave tabs in plain text or code: this is the path to madness. If
> you
>
> I just want to make sure: You include the simple left-side tab for
> indendation in this statement?

Yes, no tabs at all, if I can help it. Of course, with make files that's
impossible. Generally I always use emulated tabs (and use Shift+Tab - and
lots of cursing - when writing make files).

I've had to deal too many times with files modified by people whose tab
settings are different. In the past I have worked with width-8 tabs (which
printers tend to agree on). I dropped using tabs when I started using
Microsoft VC++, with its default setting of 4 (a more sensible width for
indents IMO) and came across the disaster of mixed width indentation. I
believe emacs users also tend to have tabs set to 4. Since the only way to
guarantee correct formatting is to use spaces always, that's what I do now.
Another thing I find annoying is that most editors don't let you see tabs as
different to spaces; you have to pass your cursor over them to check, or do
explicit searches, or go into a horribly intrusive "show space characters" or
equivalent. Inevitably there are places where people have indented using
spaces where the rest of the file uses tabs, or vice-versa. That's why I
added the backlighting functionality to NEdit: to be able to distinguish tabs
from spaces in a way that doesn't distract too much from the actual text, and
to highlight control characters, which nedit displays otherwise as simple
mnemonics. I always have backlighting turned on.

(BTW I tend to prefer an indent of 2, and lines that fit 80 columns. When
you have such a narrow indent, pressing tab or space doesn't make much
difference. I use an emulated tab distance of 4, and physical tab distance of
8. If I'm given a file to maintain I will respect its overall tab usage, often
correcting inconsistent space/tab usage, but left to my own devices I have a
strict no tabs policy.)

Check out the links from the Wikipedia page http://en.wikipedia.org/wiki/Tab -
it's entertaining at least!

> "Fancy" layout is a different matter, but I really like the ability to
> decide the indent width on display and have the number of tabs == number of
> levels of indendation.

I see why the proposed fix appeals to you then. It is impossible to manage
alignment using standard tabbing if you want to allow the tab width to change.
 The trouble is that not all tools understand tabs in this way. Much as I tend
to (over)use nedit for everything, I can't live without other tools...

> So even if you really also to ban _all_ tabs from text files (even the
> lefties that don't really change the qualitative layout regardless of
> chosen width), I want to express my happiness about nedit still offering
> emulated and real tabs for choice;-)

Well said!

Tony


More information about the Discuss mailing list