On Wed, Oct 17, 2007 at 02:16:32PM -0400, Daniel Barowy wrote:
> Hello,
>
>   Due to the fact that I am now reading other's people PHP code at work, 
> and due to the fact that some of it is horrid, 200-column stuff (and 
> admittedly, some of that horrid stuff is mine), I am looking for a program, 
> a macro, ANYTHING, that will reformat this stuff ala OpenBSD's indent(1) 
> does for C.  80 columns max, consistent use of tabs, spaces, etc.
>
>   Anyone have any suggestions?  I typically work in vi/vim or nedit (and if 
> I can prevent myself long enough from strangling myself with CAT5, emacs), 
> and, no I don't know all of their features, but if they have this feature 
> already, it is not obvious to me (or Google).  But I respect all of your 
> opinions so highly, so I thought I'd ask the experts ;^)

Google has quite a few hits for 'php indent', including
http://pear.php.net/package/PHP_Beautifier. And don't forget vim's '='
command; it's not perfect, but it's easily accessible. And it tends to,
at the very worst, make code sufficiently readable that you can complete
the formatting yourself.

                Joachim

-- 
TFMotD: mille (6) - play Mille Bornes

Reply via email to