Re: On Tabs and Spaces
- From
Linus Torvalds <torvalds@linux-foundation.org>
- Date
- Oct 16, 2007, 19:51 UTC
- Message-ID
- <alpine.LFD.0.999.0710161247511.6887@woody.linux-foundation.org>
- In-Reply-To
- <alpine.LFD.0.999.0710161240510.6887@woody.linux-foundation.org>
On Tue, 16 Oct 2007, Linus Torvalds wrote:
Show 5 quoted lines
> > But when it comes to computers, 8-character wide tab stops is the > de-facto standard. It's what every single terminal defaults to. It's the > only thing that some printers/terminals support. Anything else is by > definition non-standard.
Side note: one reason you *have* to use 8-character wide tab stops if you want to be sane is that while your editor may have alternate tab-stops, but when you look at the sources any other ways or on any other setup, the default is *always* going to be that 8-character wide tab-stop.
Do a "git cat-file -p :Makefile", and it will default to using "less". Have you added "-x2" to you LESS environment variable? Has everybody else? Not likely.
Or what happens when you just cat it straight, without any less at all?
In short: using anything but 8-char wide tab-stops is INSANE, because it will inevitably showing the same source code in different ways depending on which editor or other environment you use.
In contrast, if you just accept that 8-wide tabs are a fact, you never see any of these issues. Everything "just works".
Linus