perl mode in emacs doesn't do too bad a job here... PHP is close enough in syntax to perl for it to work fairly well (cperl-mode is too smart for PHP)...
emacs filename ALT-x perl-mode #sets the mode to cperl CTRL-SPACE #this sets the "mark" SHIFT-ALT-> #moves the "point" to the end of the buffer SHIFT-ALT-\ #indents the region between the "mark" and the "point"
I beleive that these are all default key-bindings. People who care may argue that "ALT" should be "META" (or ESCAPE). This may not do what you want, so you can always SHIFT-CTRL-_ to undo (note that I press shift before CTRL, it matters somehow).
Please don't flame me for using emacs (or describing funtionality so poorly)...
Jason Richey
Lee Daniel Crocker wrote:
Is there a tool that will reformat PHP code the way "indent" does for C code? This code is a real mess in places.
-- Lee Daniel Crocker lee@piclab.com http://www.piclab.com/lee/ "All inventions or works of authorship original to me, herein and past, are placed irrevocably in the public domain, and may be used or modified for any purpose, without permission, attribution, or notification."--LDC _______________________________________________ Wikitech-l mailing list Wikitech-l@ross.bomis.com http://ross.bomis.com/mailman/listinfo/wikitech-l