You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Dean Gaudet <dg...@arctic.org> on 1997/07/20 19:33:44 UTC
tabs
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
Re: tabs
Posted by Marc Slemko <ma...@worldgate.com>.
On Sun, 20 Jul 1997, Dean Gaudet wrote:
> 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
vi foo
:set ai
:set list
i this
that<ESC>
The line with that on will probably have a tab in front of it. This makes
it very annoying to keep tabs out. There are workarounds, but I don't
like them. My best solution is %!expand since it avoids messing up other
things I like, but it is annoying and easy to forget.
I like tabs, but unlike Dean think more along the lines of coding so that
things line up nicely no matter what people set their ts to. That does,
however, cause problems on projects with lots of developers using
different environments.