Re: Re: Re: [PEAR-DEV] where is php auto indent tool?

From: Date: Wed, 23 May 2001 12:11:50 +0000
Subject: Re: Re: Re: [PEAR-DEV] where is php auto indent tool?
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-455@lists.php.net to get a copy of this message
On Wed, May 23, 2001 at 07:17:24PM +0800, Young Gift wrote: > > The only problem I have found with c-indenters is that > >the <? and <?php tags will be split up to < ? and < ? php > The program indent(1) for C can't understand the keywords 'function', > 'class' etc. > 'function' is not included in C, and 'class' is not included in C/C++. > Convert the php source code with indent(1) will make a error when there is 'function' > or 'class'. Hm, indent (GNU indent 2.2.5) here just considers 'function' to be the return type of the actual function, and indents it as such (with default settings): function do_something() { and with -kr flag: function do_something() { which is exactly what I want. But I only have functions that start in column 1, so this may go wrong when you indent methods of classes. I also haven't tried it on oo php, so I forgot about 'class' keywords. Ah well. cheers, roel -- "Outlook not so good." That magic 8-ball knows everything! I'll ask about Exchange Server next.

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