httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dean Gaudet <dgau...@arctic.org>
Subject tabs
Date Sun, 20 Jul 1997 17:33:44 GMT
On Sun, 20 Jul 1997, Rodent of Unusual Size wrote:

>   	Changed declaration of child_init slot from int to void,
>   	and updated mod_example to include it.  Also removed
>   	evil TABs from mod_example.c and CHANGES.

What is so evil about tabs?  Every 8th column is the default for
everything, your terminal, vi, emacs, expand/unexpand.  The problem is
people who change their hard tab stops.  That's the wrong way to indent. 
If you want to indent every 4th column then you set your *shift-width* to
4 (or whatever it's called in your favourite editor).  Somehow entire
software companies are able to follow this rule.

For vi that is ":sw=4" then use ^T to indent and ^D to unindent in insert
mode.  Some of the vi clones let you bind your tab key to shift-widths... 
but I've always used ^T.

I don't know the emacs magic, I'm sure it exists. 

And why am I complaining about this?  Well because in my experience tabs
will always creep into files, they're more "natural" somehow than whacks
of spaces.  And then the anti-tab folks will come along and remove the
tabs, generating huge diffs which leave you wondering "what the heck did
they change on that line ?!?".

The indian hill style guide
<http://www.cs.wvu.edu/usr07/hware/public_html/cstyle.html> is mostly
silent on this issue except for:

    `Tabstops'' can be blanks (spaces) inserted by your editor in clumps
    of 2, 4, or 8. Use actual tabs where possible. 

Dean



Mime
View raw message