This is a discussion on PHP source code reformat pgm for Linux? within the PHP Language forums, part of the PHP Programming Forums category; I have several 500 to 1500 line PHP programs that need to be re-formatted so that they look "...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
I have several 500 to 1500 line PHP programs that need to be re-formatted so
that they look "pretty"..... proper indents, etc. Anyone know of something that will do this under Linux? Maybe a VIM or Emacs script/plugin that will read the source and re-format it for me (I use nedit and I don't think it will do such a thing.... and if so I don't know how.) I know there is a $50 one out there but this is a one-time deal on a few modules and not something that will be used again.... and it only runs on Windows.... but I have Win4Lin so I could make it work if I wanted to spend that much $$... which I don't! Thanks, Al |
|
|||
|
Adams-Blake Company wrote:
> I have several 500 to 1500 line PHP programs that need to be re-formatted so > that they look "pretty"..... proper indents, etc. > > Anyone know of something that will do this under Linux? Maybe a VIM or Emacs > script/plugin that will read the source and re-format it for me (I use nedit > and I don't think it will do such a thing.... and if so I don't know how.) > > I know there is a $50 one out there but this is a one-time deal on a few > modules and not something that will be used again.... and it only runs on > Windows.... but I have Win4Lin so I could make it work if I wanted to spend > that much $$... which I don't! > > Thanks, > > Al > JEdit (http://www.jedit.org) has a nifty plugin named AStyle Beautifier. It works well on PHP source code. -- Amir Khawaja. ---------------------------------- Rules are written for those who lack the ability to truly reason, But for those who can, the rules become nothing more than guidelines, And live their lives governed not by rules but by reason. - James McGuigan |
|
|||
|
Adams-Blake Company wrote:
> I have several 500 to 1500 line PHP programs that need to be re-formatted so > that they look "pretty"..... proper indents, etc. I'm in a lucky mood :) So I googled for "reformat source code php" to get to http: ... ah! why don't I let you try it? -- --= my mail box only accepts =-- --= Content-Type: text/plain =-- --= Size below 10001 bytes =-- |
|
|||
|
Pedro Graca wrote:
> Adams-Blake Company wrote: >> I have several 500 to 1500 line PHP programs that need to be re-formatted >> so >> that they look "pretty"..... proper indents, etc. > > I'm in a lucky mood :) > So I googled for "reformat source code php" > > to get to http: ... ah! why don't I let you try it? Thanks. I had done a search suing "php code reformat" and got a totally different set of links, the best one being: http://www.semdesigns.com/Products/F...erExample.html however it only runs on Windows. The one you pointed me to: http://www.bierkandt.org/beautify/index.php looks like it will work.... but I get a bit nervous when I see disclaimers like: WARNING! It can produce unexpected output. Always save your work and preview the formatted code before using it. But I'll give it a try and see how it works. Al |
|
|||
|
Adams-Blake Company wrote:
> WARNING! It can produce unexpected output. Always save your work and preview > the formatted code before using it. Even without the warning that is a "Good Thing" to do :) -- --= my mail box only accepts =-- --= Content-Type: text/plain =-- --= Size below 10001 bytes =-- |