sm-discuss AT lists.ibiblio.org
Subject: Public SourceMage Discussion List
List archive
Re: [SM-Discuss] Request for comments - formating in spells
- From: Thomas Orgis <thomas-forum AT orgis.org>
- To: sm-discuss AT lists.ibiblio.org
- Subject: Re: [SM-Discuss] Request for comments - formating in spells
- Date: Tue, 22 Jul 2008 14:23:46 +0200
Am Tue, 22 Jul 2008 08:05:08 -0400
schrieb flux <flux AT sourcemage.org>:
> > 2)
> > BUILD file when not default tends to be aligned on some conditional
> > clauses
> > and end of line with configure and options:
> > if [[ foo == bar ]; then
> > [tab]./configure --opt1 \
> > [tab] --opt2 \
> > [tab] --opt3 &&
> > [tab]make
> > fi
> >
> > ([tab] means tab and " " space means space... so in the above lines
> > there's
> > only one tab...)
> There is a new issue that comes up with tabs: not everyone has tabs set
> to the same width, so the formatting will be different on different
> screens
This replique comes two-fold:
1. Standard pro-TAB rant.
No. It will always be the same width of indent. No matter how wide your
Tab setting is, you always have one level of indent per tab. Two tabs
stay two tabs. Always (with indendation, that is).
The formatting is consistent.
That is the beauty of it: You please people with different tastes about
the width of an indendation step without any loss in consistency of the
file. You do not want to say "oh, this line should begin after two
leading spaces", you want to say "this line has one level of indendation".
What people always mess up is the idea of aligning stuff on a
per-character basis using tabs. That is bullshit.
You can line up tabs only with tabs. When you realize that a tab has no
definite width, you have no problem with different tab widths...
For fancy formatting you use spaces _after_the_indent_ (ignoring the
fact that there are indeed people who do _not_ use fixed-width fonts;-).
2. Pragmatic insight with respect to shell scripting.
For the case of Bash scripts, I hit a simple fact that is slowly
convincing me _not_ to use tabs in shell scripts at all:
When I want to test a block of shell code by simply pasting it into a
terminal, the tabs get pasted also -- and transform from harmless
whitespace to massive word completion triggering!
Though I really dislike having to use a certain number of spaces for
indent (as one space really is a bit tight), this is a strong argument
for me to shun tabs in shell scripts altogether (not just for indent).
Note, though, that I use tabs for indent in all my other coding...
> Tabspacing can be redefined in the different editors, but I have a
> feeling we will end up in a war about tabspacing... "8 is best! No 4 is
> best! You're all losers, 2! WTF, 5!" ad nauseum.
The whole point is that you do _not_ have to agree to a tab width --
unless when you mean "x spaces written to file when I type TAB".
Alrighty then,
Thomas.
Attachment:
signature.asc
Description: PGP signature
-
Re: [SM-Discuss] Request for comments - formating in spells
, (continued)
- Re: [SM-Discuss] Request for comments - formating in spells, flux, 07/23/2008
- Re: [SM-Discuss] Request for comments - formating in spells, Ethan Grammatikidis, 07/26/2008
- Re: [SM-Discuss] Request for comments - formating in spells, Ethan Grammatikidis, 07/27/2008
- Re: [SM-Discuss] Request for comments - formating in spells, Juuso Alasuutari, 07/28/2008
- Re: [SM-Discuss] [OT:wrapping] Request for comments - formating in spells, Thomas Orgis, 07/23/2008
- Re: [SM-Discuss] [OT:wrapping] Request for comments - formating in spells, Juuso Alasuutari, 07/23/2008
- Re: [SM-Discuss] Request for comments - formating in spells, Robert Figura, 07/23/2008
- Re: [SM-Discuss] Request for comments - formating in spells, Thomas Orgis, 07/23/2008
-
Re: [SM-Discuss] Request for comments - formating in spells,
seth, 07/22/2008
- Re: [SM-Discuss] Request for comments - formating in spells, Vlad Glagolev, 07/22/2008
Archive powered by MHonArc 2.6.24.