Going native with jEdit:
New download makes this editor shine

placeLogo(‘jedit’); One of JEdit‘s biggest strengths is its ability to adapt to any user’s tastes and operating system. Unfortunately, rubella this is also the reason many people are turned off by its interface at first glance — because it can appeal to anybody, its default settings often appear unfriendly to everybody.

Thus, today’s installment of our ongoing jEdit discussion focuses on getting the open-source editor to look and feel like a friendly, inviting, native OS application. And a big step in that direction is Turdhead’s own OS X icon package released today.

The tips here will focus on fine-tuning application settings and installing new plugins, and will apply to any operating system on which jEdit runs (There are many!), but of course, the settings I’ve chosen for this tutorial happen to look best on OS X.

We’re going to start at ground zero and assume this is the first time you’ve used jEdit. If it’s not, feel free to skip ahead to the “Scrape off the ugly” section below, and the rest of us will meet up with you then.

Now let’s get started.

If you haven’t already, download and install the latest development version of jEdit. On the Mac, installation is as simple as opening the downloaded drive image and dragging the jEdit.app into your Applications folder (and while you’re at it, go ahead and drag it from there to your Dock as well).

Once it’s installed, go ahead and launch jEdit.

Note: All the images in this section can be enlarged simply by clicking on them.

Obviously, you’ll want to go ahead and close the help menu so you get a look at the… um… “interface:”

Ok, so it’s not so bad, but it’s certainly betraying its cross-platform roots, and it just doesn’t seem to fit in our cool, modern operating environment. So let’s do something about that.

Scrape off the ugly

Our first step in getting rid of the ugly involves changing the default icons and other graphics to better reflect our current operating system. I was unable to find an icon theme that fit well into the OS X environment, so I decided to roll my own. You can download this magic “jar” file (which is also now available through the jEdit community site) and drop it in your /Library/Java/Home/lib/ext folder. (If you’re interested in other icon themes, you can find pre-existing icon sets and their installation instructions at the jEdit community site.)

You will need to close jEdit for this (otherwise, the icons won’t change until the next time you launch it), and chances are you will need to Authenticate (which means you must type your administrative account’s password) before OS X will let you place the file in this “top-secret” system folder.

Once you’ve successfully managed to place the OSXTurdheadIconPack.jar file into your Java home directory (i.e., /Library/Java/Home/lib/ext on plain-vanilla OS X), relaunch jEdit. If you just installed jEdit, you’ll probably run into a new nag, the “Did you know…” box. It’s useful, but we want it gone so jEdit loads as fast as possible: Uncheck the “Show tips at startup” box and press close. (And later we’ll get rid of that snazzy but time-consuming splash screen too).

Once it’s loaded, you’ll see that we’re on our way to going native:

It’s starting to look familiar, but it’s not quite there. What’s with the big drop-down box spanning the width of the entire application under the toolbar? Turns out that’s a “buffer switcher” that looks decidedly less friendly than the “tabbed panels” we often see in modern applications today (A “buffer” is nerdspeak for where jEdit keeps an open document). Thanks to jEdit’s great system of plugins and user preferences, though, we can easily change the buffer-selection process to suit our sheeplike (er, I mean “sophisticated”) modern tastes.

Plugging in some coolness

Adding tabbed panels (rather than using the default selection drop-down box) substantially changes the way jEdit works. Fortunately, because it’s built on a plug-in architecture, making such changes is often just a matter of “plugging in” the new functionality we want. So let’s do it.

Start by going to the Plugins>Plugin Manager menu. At first, you’ll only see the default plugins that come with your particular OS’s distribution package. Once you discover the magic of plugins, though, you’ll no doubt want to collect plenty more.

Now click the Install tab (How about that? At least the dialog boxes have tabs now). After a brief pause while jEdit collects information from the ether, you’ll see a list of available plugins. Eventually, you’re going to want to try several of them, but for now, we’re just interested in one.

Scroll through the list and select BufferTabs and click the Install button. Because jEdit’s plugins are dynamically loaded, there is no reason to restart after installing new features this way.

The download should take very little time, but if it seems to hang, just press “Stop” and adjust your download options (I had to the first time!). Fortunately, this is easy: Click Download Options and then Update mirror list. A new list of plugin repositories appears, and you can then select a new site from which to receive updates.

For some reason, I didn’t have much luck with some of these sites, but the sites named “North America: EasyNews (Phoenix, AZ)” and “South America: UFPR (Curitiba, Brazil)” seem to work fine.

While you’re in this “preference pane” dialog box, you can also check the “Download plugin source code” box if you think you might want to snoop around in the java source code of plugins later. Click OK, and then click Install to restart the plugin download.

Once the download is complete, press Close on the Plugin Manager dialog box.

Now,remember what I said about the plugins being available immediately after installation? Well… where are the tabs I promised? Although you don’t have to restart jEdit, you do have to enable the new plugin before it will work.

Go to Plugins>Plugin Options and (if it’s not already selected) select BufferTabs under the Plugins tree on the left. Check the box next to “Enable BufferTabs by default” and change the “Location of BufferTabs” drop-down to “top” (unless you like ’em elsewhere, of course).

I personally leave the “Enabled colored tabs” checkbox empty, but you might like it otherwise. When you’re done, press Apply to apply the effect immediately to the open buffer, and then choose OK.

We’re close, but we still have that big ol’ drop-down box across the top, don’t we? It’s part of the main jEdit interface (as opposed to being a plugin), but with tabbed buffers, we just don’t need it anymore. So let’s go to jEdit’s main application Preferences panel by clicking jEdit>Preferences (or typing CMD-,).

Look familiar? This is the same dialog box we used to set the download options for the Plugin Manager. Obviously, the Preferences panel tends to remember which preferences you were working with last time, so while you’re experimenting with different settings, you won’t need to keep navigating back to where you want to be (assuming you want to be in the same place).

In this case however, we do want to set other preferences, so we’ll use the left-hand navigation tree to select View.

While we’re here, we might as well change a couple of other things: I tend to like the “Alternate toolbar placement” option, and I like a good beep when searching automatically wraps.

Regardless, the thing we came to do is to deselect the “Show buffer switcher” checkbox.

Click Apply and OK.

Much cleaner, eh? Now instead of the gargantuan buffer switcher drop-down box, we have a single, simple “tab” button in the center of our editing area.

Let’s prove they work: If we open (or create) a second document, we’ll get another tab for each document opened.

Note that until you type something in the first buffer, jEdit’s File>New command simply ignores you: You’ve already got a new file, after all. Thus, to test the tabs, you may have to enter some text into the first document buffer to make it “not new.” (In jEdit speak, this is known as making the buffer “Dirty”). By default, a buffer’s “dirtiness” is reflected in the small icon to the left of the filename in the tab itself — an excellent reminder as to whether you’ve saved your work lately.

Ok, so now we have pretty icons, tabbed document navigation and a few default settings taken care of, but if you bothered to make your buffers dirty (snicker, snicker), you’ve already realized that the default font and size settings of jEdit are way out of style by today’s standards. Admittedly, this is purely a matter of taste, but let’s address it now as fact.

Personally, I like the default looks of both TextMate and the Apple XCode IDE (I just don’t like using either of them much), so I used many of their default settings as the basis for my own font and color scheme. Under jEdit>Preferences>jEdit>Text Area, my settings look like this:

In fact, now that you’re getting the hang of changing preferences to suit your tastes, I won’t bore you to death by explaining what every little setting and checkbox does. However, because I’m way happy with the settings I’ve chosen (and I think others might be too), here are some shots of the various settings panels as they are on my computer today (The left-hand navigation tree and banner bar in each shot indicates exactly which panels are being shown). Feel free to use ’em if you’d like!

So that’s about it for changing the look of jEdit to match what you might expect from the professional-level tool that it is. Later, we might look at setting more intuitive keyboard shortcuts and installing a few more plugins. I’m open to suggestions!


3 thoughts on “Going native with jEdit:
New download makes this editor shine”

  1. Hi and thanks for the icon package for JEdit.
    I have tried to use it with JEdit 4.3pre14 on Mac OSX 10.5 and it doesn’t work, JEdit is still using his own icon theme, the only new option is the tango theme added recently, or the old one, but nothing about the MacOSX icons from your package.
    I have put the .jar file with the icons in the preper directory but no luck.
    Have you had this problems with these version of JEdit and MacOsX.

  2. I know this is a rather old post, but since i have the same prob as Pablo and cant figure it out, only difference is, that the packege is show but it cant be selectet.
    I wonder if there is any solution till now?

Leave a Reply

Your email address will not be published. Required fields are marked *