Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Re: [gentoo-dev] About how many spaces a tab represents

6 views
Skip to first unread message

Ciaran McCreesh

unread,
Apr 14, 2013, 5:30:02 PM4/14/13
to
On Sun, 14 Apr 2013 23:22:04 +0200
Pacho Ramos <pa...@gentoo.org> wrote:
> I noticed this problem now that joe was modified to comply with this
> rule set in devmanual:
> http://devmanual.gentoo.org/ebuild-writing/file-format/index.html#indenting-and-whitespace
>
> It stated a tab represents 4 spaces. Where does this rule come from?
> Why 8 spaces wasn't chosen instead? I say that because looks like 8
> spaces equivalence is used by tools like "cat", "less", even CVS
> reports in gentoo-commits show tabs as 8 spaces instead of 4.

Hysterical raisins. Unfortunately drobbins mandated it that way early
on, because he didn't use a proper text editor.

--
Ciaran McCreesh
signature.asc

Pacho Ramos

unread,
Apr 14, 2013, 5:30:02 PM4/14/13
to
I noticed this problem now that joe was modified to comply with this
rule set in devmanual:
http://devmanual.gentoo.org/ebuild-writing/file-format/index.html#indenting-and-whitespace

It stated a tab represents 4 spaces. Where does this rule come from? Why
8 spaces wasn't chosen instead? I say that because looks like 8 spaces
equivalence is used by tools like "cat", "less", even CVS reports in
gentoo-commits show tabs as 8 spaces instead of 4.

Thanks for the info

Ulrich Mueller

unread,
Apr 14, 2013, 6:10:01 PM4/14/13
to
AFAIK, there's no standard that specifies the positions of tab stops,
so multiples of 4 are as good as anything else. Different text editors
have different defaults (Emacs uses multiples of 8, but it's easy to
change).

Of course, once you have a convention that is widely followed, it's
wise not to change it ...

Ulrich

Michał Górny

unread,
Apr 15, 2013, 1:30:02 AM4/15/13
to
On Sun, 14 Apr 2013 23:22:04 +0200
Pacho Ramos <pa...@gentoo.org> wrote:

Hmm, does that have implications on anything else but counting line
width?

--
Best regards,
Michał Górny
signature.asc

Pacho Ramos

unread,
Apr 15, 2013, 2:20:01 AM4/15/13
to
Well, I was a bit surprised an ebuild I was thinking was looking in a
way, was really shown a bit different when, for example, simply running
less over it :/

Aaron W. Swenson

unread,
Apr 15, 2013, 7:20:02 AM4/15/13
to
A tab is a tab. How wide it is, is up to you. The convention is that
four spaces should be replace by a tab. You can configure tab width
for your terminal with:

setterm -regtabs 4

If you want to, that is.

--
Mr. Aaron W. Swenson
Gentoo Linux Developer
Email : titan...@gentoo.org
GnuPG FP : 2C00 7719 4F85 FB07 A49C 0E31 5713 AA03 D1BB FDA0
GnuPG ID : D1BBFDA0
signature.asc

Alec Warner

unread,
Apr 15, 2013, 3:10:02 PM4/15/13
to
How many avocados does a tab represent?

-A

Andreas K. Huettel

unread,
Apr 15, 2013, 4:10:02 PM4/15/13
to
Am Montag, 15. April 2013, 13:10:48 schrieb Aaron W. Swenson:
>
> A tab is a tab. How wide it is, is up to you. The convention is that
> four spaces should be replace by a tab. You can configure tab width
> for your terminal with:
>
> setterm -regtabs 4
>
> If you want to, that is.

I suggest 1/100 furlong.

--

Andreas K. Huettel
Gentoo Linux developer
dilf...@gentoo.org
http://www.akhuettel.de/

signature.asc

Mike Frysinger

unread,
Apr 17, 2013, 2:30:02 PM4/17/13
to
add --tabs=4 to your $LESS
-mike
signature.asc
0 new messages