Re: VIM config in PEAR files?

From: Date: Tue, 16 Apr 2002 09:26:26 +0000
Subject: Re: VIM config in PEAR files?
References: 1 2 3 4 5 6 7 8  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-5547@lists.php.net to get a copy of this message
On Tue, 2002-04-16 at 11:01, Dave Mertens wrote: > On Mon, Apr 15, 2002 at 09:06:22PM +0200, Stig S. Bakken wrote: > > On Mon, 2002-04-15 at 11:23, Dave Mertens wrote: > > > > Tabs have variable rendering size, so using spaces only is the only > > predictable way of formatting code. Did you ever see what happens to > > indentation in "cvs diff" output on code that uses a mix of tabs and > > spaces? Or in "less"? Or in any other program using a different tab > > width? It's all messed up, and that's why we have this standard. > > But why is using someone spaces and tabs mixed up?? And in every editor a tab still is a tab. > I don't program in diff and less is as far i know read-only. printf("%s", $arg); ^^^^^^^ This is 7 spaces. That's one 4-space tab and 3 spaces. If displayed in some editor that has 8-space tabs by default, it will look like this: print("%s", $arg); Ditto with tabbed code written in an 8-space-tab editor viewed with 4-space tabs: if (foo && bar) { } Will look like this: if (foo && bar) { } In an environment like PEAR where people use lots of different editors, using tabs simply doesn't work. People will end up doing whitespace commits fixing rendering in their editor, while breaking it for others. Without tabs it will look the same to everyone. Diff and less are tools that programmers use, so that argument is just bogus. - Stig

« previous php.pear.dev (#5547) next »