text editing tool

Jeff turned me on to jEdit, “a cross platform, programmer’s text editor written in Java” that, with the XML plugin, is a nifty way to tag XHTML or TEI-conformant XML. It enforces the DTD as you go, just like XMetal. Unlike XMetal, jEdit is free.

I’ll go into more detail about setting it up if anyone’s interested.

Update, June 23: Okay, first make sure you have the right Java runtime environment on your computer. Then, you download the appropriate version of jEdit from the website. Since I reluctantly run Windows, I downloaded the Java-based installer for that system, but you should be able to follow the directions on the website for any OS.

Once you have the program installed, you’ll want to add the XML plugin. To do so, make sure you’re online, then go to the jEdit “Plugins” menu, select “Plugin Manager,” and then click the “Install Plugins” button. You’ll be presented with a list of available plugins; just scroll down until you find the XML plugin, check the box, and click the “Install” button. Close the “Plugin Manager” screen. You will probably get a message telling you to restart jEdit in order for the new plugin to work.

In order to make the menus for tags, entities, and IDs visible on the right side of the screen, go to the “Utilities” menu and select “Global Options.” Select “Docking” from the menu on the left. Over on the right, scroll down till you see “XML Insert”; change the drop-down menu to read “right.” Close the “Global Options” window.

You should now see a box in the upper right-hand corner that reads, vertically, “XML Insert.” You can click on this box to make the tagging interface appear or disappear. Once the interface is visible, you can click on an element to get a pop-up window that provides you with a menu of appropriate attributes for that element. If you don’t want to see that window, however, you can just right-click the element and it will be inserted (both opening and closing tags) in the document wherever you have placed the cursor. If you have highlighted some text, then the opening tag will be placed before the text and the closing tag will be placed after it. If you type an opening tag, jEdit keeps track of that opening and will automaticallly insert an appropriate, complete closing tag when you begin to type it.

As I said above, the editor enforces the DTD as you go. The menu of elements will only display those elements that are allowed by the DTD at the point in your document where you have placed your cursor. I’ve played around with (X)HTML documents because it appears that the DTD is included with the XML plugin, but I haven’t tried downloading the TEI (or TEI-lite) and getting jEdit to enforce that DTD. I don’t see why it wouldn’t work just as well, however, and Jeff seems to be very happy with using it for this purpose.

There you have it. Any questions?

Print Friendly

3 thoughts on “text editing tool

  1. Please do. I think it’s still set up on my Windows laptop (is it available for OS X?), and I wasn’t impressed at all with how much RAM it needed to run and how slow and seemingly featureless it was. But obviously I’ve been doing something wrong! So any pointers would be great.
    I don’t have my PC with me for the rest of the summer, so can’t check what version I’ve got. I seem to remember a .2, but was it 0.2? or 1.2? Or perhaps I’m just on crack. I installed it… I think a year and a half ago or so.

  2. It will work on any operating system, provided you have downloaded the right Java runtime environment from Sun.
    This is my first time using it, so I can’t say for sure, but I believe it is much improved over previous versions. The most current version is 4.1. I’ll post more details after the weekend.

  3. Posting this for the purpose of the recent comments on the homepage: I’ve updated the entry on jEdit with more detail on setting it up for XML editing.

Comments are closed.