Gentoo Archives: gentoo-dev

From: Aron Griffis <agriffis@g.o>
To: gentoo-dev@g.o
Subject: [gentoo-dev] Tabs and spaces
Date: Fri, 19 Oct 2001 10:55:03
1 Hello,
3 There is apparently a difference of opinion among Gentoo developers
4 concerning the use of tabs and spaces. I realize this is a topic as
5 dear to the hearts of developers as Gnome vs. KDE, and Vim vs. Emacs.
6 So I approach it with some trepidation. Nevertheless, I've been
7 frustrated by the current practice, so I'm going to propose my opinion
8 and hope that this thread won't persist long on gentoo-dev.
10 The current practice appears to be to set tab stops at 4 characters.
11 The alternative I suggest is to leave tab stops at 8 characters, but use
12 4-character indentation (or allow developers to choose their own
13 preferred indentation).
15 Here are my reasons:
17 1. 8 characters is the default tab stop for ALL mono-spaced
18 applications. That includes all editors, viewers, and printing
19 programs. To use a different tab width requires reconfiguration of
20 every program.
22 Note: You can't reconfigure "cat". And no, I don't want to alias cat
23 to "expand -t 4".
25 2. Modern editors supply users with the ability to use an indentation
26 that differs from the current tabstop setting, in case you want to
27 use something other than 8 characters. For example, Vi has the
28 "shiftwidth" setting. Vim offers the "smarttab" setting, which makes
29 things even more comfortable.
31 I am certain that Emacs offers similar settings, though as a Vi(m)
32 user, I can't cite them.
34 3. If you use this method, then your ebuilds/code will always look
35 right, regardless of what method you use to view them. You can edit
36 an ebuild by any developer, and you don't have to wonder... "Did they
37 use spaces instead of tabs? Did they mix them? What was their
38 intended tabstop (which can drastically affect the appearance of text
39 tables)?" Instead, it JUST WORKS.
41 I'm not trying to settle on an indentation scheme here. Sure, that
42 might provide even more comfort and consistency in the ebuilds, but it
43 infringes on the developer's personal preferences more than I would
44 wish. I simply would like tab characters to be the standard 8 so that
45 editing/viewing/printing programs can work without needing to tweak each
46 one.
48 What do you think?
50 Thanks,
51 Aron


Subject Author
Re: [gentoo-dev] Tabs and spaces Chris Houser <chouser@g.o>
[gentoo-dev] The official answer on tabs and spaces Daniel Robbins <drobbins@g.o>