Monday, October 24, 2011

tidy reformat beautify html xml gedit

sudo apt-get install tidy
sudo apt-get install gedit-plugins

Under Plugins Tab:
Enable External tools

(My note on tidy is here)

Using PHP_Beautifier
This tool will not be able to beautify inline html and php together.

sudo apt-get install php-pear
# Still in Beta state

sudo pear install PHP_Beautifier
sudo pear install PHP_Beautifier-0.1.15.tgz

php_beautifier -s4 -l "ArrayNested() IndentStyles(style=bsd) NewLines(before=if:switch:while:for:foreach:function:T_CLASS:return:break,after=T_COMMENT)"

Full instruction at


More info
gedit-3 :
gedit-2 :

No comments:

Post a Comment