Gedit-code_beautifier is a project mainly written in ..., it's free.
Plugin for formatting source code (Ruby, PHP, C, C++, Java)
Plugin for formatting source code (Ruby, PHP, C, C++, Java).
Installation of the plugin:
This module uses external tools: to format ruby "Ruby Script Beautifier" (http://www.arachnoid.com/ruby/rubyBeautifier.html) to format PHP, C, C++, Java astyle "Artistic Style 1.24" (http://astyle.sourceforge.net/)
The last one requires compilation, so possibly you should recompile it. In this case simply replace file ~/.gnome2/gedit/plugins/code_beautifier/astyle