Thread (95 messages) flat view 95 messages, 33 authors, 2016-06-15

Re: On Tabs and Spaces

From: Linus Torvalds <torvalds@linux-foundation.org>
Date: 2016-06-15 22:43:42


On Tue, 16 Oct 2007, Linus Torvalds wrote:
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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help