GEdit plugin formatting Ruby and ERB code now!

I have published some time ago a GEdit plugin for formatting Ruby code.

Now I just updated the plugin and added support for formatting html.erb and .xml.erb files too.

The main idea  is to make this plugin a generic language code formatter for GEdit, contributions are welcome.

As told before, to install it, grab the source from GitHub and copy all files to ~/.gnome2/gedit/plugins.

To download the files using Git use the following command line:

git clone git://github.com/urubatan/gedit_formatter.git

If you want to contribute just send a pull request in GitHub or send me a patch by e-mail.

To use the plugin, just press CTRL+ALT+F after installing and enabling it.

If you do not have git installed, you can download a tarbal with the latest sources from this link.

If you enjoyed this post, make sure you subscribe to my RSS feed!

5 comments so far

  1. ramon June 23, 2008 9:22 am

    i’m not (yet) using your plugin. but i would if it supported html, xml, javascript and actionscript3 :-)

    maybe you could write these or publish a tutorial on how to write source code formatters for gedit in general?

    thank you

  2. Urubatan June 23, 2008 9:56 am

    Hi ramon,
    The code for formatting ERB can be used to format HTML and XML too, but I want to integrate tidy for this work, I think next week I can publish a version with this integrated.
    javascript and actionscript 3 will be a little more dificult, but we can work that out.

    The plugin uses command line utilities to format the code, I’ll publish a tutorial on how to integrate other formatters ASAP, thanks for the tip.

  3. language xml July 10, 2008 6:56 am

    […] soon.Give it a try if you use GEdit to work with rails, and wait for more languages support soon!http://www.urubatan.info/2008/06/gedit-plugin-formatting-ruby-and-erb-code-now/Software Review - MapForce 2008 From Altova Blogcritics.orgIf you regularly have to convert data […]

  4. tentamen August 21, 2008 9:04 am

    hope it support for php :)

  5. Hector Suarez Barenca September 21, 2008 11:34 am

    Could you publish the tutorial about how to integrate other formatters?, I would like integrate Jalopy.

    Regards

Leave a comment

Please be polite and on topic. Your e-mail will never be published.