public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
Search results ordered by [date|relevance]  view[summary|nested|Atom feed]
thread overview below | download: 
* Re: [gentoo-dev] Ebuild indentation (tabs vs. spaces) fascism ;^)
  @ 2002-04-28  3:38 99%   ` Arcady Genkin
  0 siblings, 0 replies; 1+ results
From: Arcady Genkin @ 2002-04-28  3:38 UTC (permalink / raw
  To: gentoo-dev

"Bruce A. Locke" <blocke@shivan.org> writes:

> In any decent editor you can set the number of spaces a tab corresponds
> to on the screen.  If tabs in your editor are creating too much
> whitespace for your taste on your screen, its configurable.  And because
> you used tabs, anyone can tell their editor how many spaces to display
> and if they use tabs then its all left up to how the editor displays it.
>
> Also which would you prefer to do:  hit space a few times to make sure
> your new line is lined up with the old ones, or hit 
> tab once and be done with it.

Just as easily any decent editor can be configured to not use tab
characters, and insert 4 spaces when you hit TAB once (or to translate
all tab chars into spaces when saving the file).  The advantage of
using spaces is that it also works well in *any* editor with *default*
configuration, works with the pagers like "less" or "more", and even
with "cat".  Of course, you can, possibly, configure your terminal
emulator to interpret TAB character as 4 spaces, but that's already
not trivial to do.

I find that I often use emacs and vi interchangeably, depending on the
task at hand.  Furthermore, sometimes I use them from my usual
(non-privileged) account, and sometimes---as root.  On top of this, I
do it on more than one machines, that don't share home directories.
If the indentation were all-spaces, I could just fire up any editor,
without thinking twice what machine I'm logged in to, and see the
ebuild exactly the way it was intended to be seen, as well as be able
to edit it likewise.  This all goes to hell if using tabs, unless I
pre-configure my VI, emacsen and terminals for every possible
combination of machines and accounts.

> I used to be anti-tab myself... Then overtime as I started using decent
> editors (vim, emacs, etc) I realized how much of a pain space indenting
> was and went back and have converted all my old ebuilds to using tabs.

Interesting, why was it a pain with good editors?  I have switched to
using all spaces years ago, when I saw what a piece of my tabbed code
looked like in somebody else's terminal, and never looked back.

> whats more fascist... forcing me to deal with "hardcode" spaces
> forcing me to have my terminal X columns wide, or leaving it to the
> enduser to configure their editor to display it with the number of
> spaces they like ;)

Okay, you are not really serious, right?  It's quite reasonable to
assume that your terminal is at least 80 columns wide.  Besides, the
adjustment you mention won't really work all of the time.
-- 
Arcady Genkin


^ permalink raw reply	[relevance 99%]

Results 1-1 of 1 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2002-04-27 22:17     [gentoo-dev] Ebuild indentation (tabs vs. spaces) fascism ;^) Arcady Genkin
2002-04-28  1:36     ` Bruce A. Locke
2002-04-28  3:38 99%   ` Arcady Genkin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox