Re: Re: [PEAR-DEV] where is php auto indent tool?
| From: | Roel Vanhout | Date: | Tue, 22 May 2001 08:52:48 +0000 |
| Subject: | 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-435@lists.php.net to get a copy of this message | ||
Have a look at http://astyle.sourceforge.net/. It is
actually only for
c/c++ and java, but the source code is nicer (a lot nicer) then the
source for gnu indent, so it should be easier to change it to work for
php source code. The only problem I have found with c-indenters is that
the <? and <?php tags will be split up to < ? and < ? php ; a possible
solution would be a script that first replaces these tags with some
text, then runs the indenter, and restores the tags. Probably shell-style
comments will be considered preprocessor statements and be indented
wrong, but I never use those so I can't really say. Be sure to let us
know if you have any successes, I'm interested to know, I just haven't
had time yet to look into it myself.
cheers,
roel
On Tue, May 22, 2001 at 03:32:56AM +0800, Young Gift wrote:
> The tool I want is a scource code beautifier , which can format the
> code has been writen into any style. The best example is indent(1) for
> C in Linux. I have found VisualSlickEdit and ASPEdit can't give me
> help. They can't cut a line with more than one sentence , and are ill
> in brace.
--
People nowadays, complaining they only get 5MBs of disk space! In my day
we were lucky if we had one file, and that was /dev/null.