Gentoo Archives: gentoo-dev

From: Arcady Genkin <agenkin@××××××.com>
To: gentoo-dev@g.o
Subject: Re: [gentoo-dev] Ebuild indentation (tabs vs. spaces) fascism ;^)
Date: Sat, 27 Apr 2002 22:38:21
In Reply to: Re: [gentoo-dev] Ebuild indentation (tabs vs. spaces) fascism ;^) by "Bruce A. Locke"
1 "Bruce A. Locke" <blocke@××××××.org> writes:
3 > In any decent editor you can set the number of spaces a tab corresponds
4 > to on the screen. If tabs in your editor are creating too much
5 > whitespace for your taste on your screen, its configurable. And because
6 > you used tabs, anyone can tell their editor how many spaces to display
7 > and if they use tabs then its all left up to how the editor displays it.
8 >
9 > Also which would you prefer to do: hit space a few times to make sure
10 > your new line is lined up with the old ones, or hit
11 > tab once and be done with it.
13 Just as easily any decent editor can be configured to not use tab
14 characters, and insert 4 spaces when you hit TAB once (or to translate
15 all tab chars into spaces when saving the file). The advantage of
16 using spaces is that it also works well in *any* editor with *default*
17 configuration, works with the pagers like "less" or "more", and even
18 with "cat". Of course, you can, possibly, configure your terminal
19 emulator to interpret TAB character as 4 spaces, but that's already
20 not trivial to do.
22 I find that I often use emacs and vi interchangeably, depending on the
23 task at hand. Furthermore, sometimes I use them from my usual
24 (non-privileged) account, and sometimes---as root. On top of this, I
25 do it on more than one machines, that don't share home directories.
26 If the indentation were all-spaces, I could just fire up any editor,
27 without thinking twice what machine I'm logged in to, and see the
28 ebuild exactly the way it was intended to be seen, as well as be able
29 to edit it likewise. This all goes to hell if using tabs, unless I
30 pre-configure my VI, emacsen and terminals for every possible
31 combination of machines and accounts.
33 > I used to be anti-tab myself... Then overtime as I started using decent
34 > editors (vim, emacs, etc) I realized how much of a pain space indenting
35 > was and went back and have converted all my old ebuilds to using tabs.
37 Interesting, why was it a pain with good editors? I have switched to
38 using all spaces years ago, when I saw what a piece of my tabbed code
39 looked like in somebody else's terminal, and never looked back.
41 > whats more fascist... forcing me to deal with "hardcode" spaces
42 > forcing me to have my terminal X columns wide, or leaving it to the
43 > enduser to configure their editor to display it with the number of
44 > spaces they like ;)
46 Okay, you are not really serious, right? It's quite reasonable to
47 assume that your terminal is at least 80 columns wide. Besides, the
48 adjustment you mention won't really work all of the time.
49 --
50 Arcady Genkin


Subject Author
Re: [gentoo-dev] Ebuild indentation (tabs vs. spaces) fascism ;^) "Bruce A. Locke" <blocke@××××××.org>
Re: [gentoo-dev] Ebuild indentation (tabs vs. spaces) fascism ;^) Alexander Gretencord <arutha@×××.de>