Home > Uncategorized > Indenting XML documents with gEdit

Indenting XML documents with gEdit

December 6th, 2008 Leave a comment Go to comments

gedit is a pretty cool text editor for the GNOME desktop environment.

The problem is that sometimes I found myself using it to edit XML documents but there is no way to pretty print them.

I found yesterday a quick solution to this problem thanks to the External Tools support in gedit and a small utility called xmlindent.

Once you have installed xmlindent click on Tools->External tools, and on the dialog enter the following informations:

External tools dialog

Of course you can customize the options as you wish, the displayed configuration just indents the whole document and replace the unindented one.

To use it just click External Tools -> xmlindent.

Categories: Uncategorized Tags:
  1. September 2nd, 2008 at 05:09 | #1

    If you don’t find the Tools > External Tools , it might just be that it has not been turned on (it is a plugin). Go to Edit > Preferences > Plugins and check that there is an entry for “External Tools” and that it is enabled. Following that the rest of this entry applies.

  1. No trackbacks yet.