My weapon of choice: jEdit

Published on Wed, 11/24/2010 - 16:19

jEdit is by far my favorite developer tool. I have tried every text editor I can get my hands on. Free, commercial, I've tried it all. Of course, I'm only looking at Mac compatible editors, since I'm usually coding on my MacBook Pro. I've been using jEdit on and off for years, first on Windows, then on Mac and Linux. There are always a few little things that bug me about it, so whenever I see another editor pop up, I try it out. Some have been close, but so far I've always come back to jEdit.

Here are some of the editors/IDEs I have tried:

I'm sure there have been others, but those are the ones that stick out. I could do a massive review of all of these editors, but I think I'll stick with why jEdit is the one that sticks.

The first thing I do whenever I install jEdit is to make sure I pick the native Swing look & feel under "General Options -> Appearance" and restarting. I prefer a semi-native feel to the standard Swing Metal. Then I set a few things like changing the tabs to 4 spaces, getting rid of the wrap indicator, changing the font to Andele Mono, turning on line numbering, turning off the buffer switcher, turning on the search box and turning off backups on save. These are, of course, my preferences – to each their own – but the point is that it has the power to allow all of these nice little customizations.

Then the really important part comes. Plugins. There are plugins for just about everything that will make life much easier. First off, the general non-language specific ones.

  • BufferTabs – Uses a tab bar for switching buffers.
  • CandyFolds – Uses colors (that are customizable using regex) to indicate code blocks by tab level.
  • Color Chooser – Allows you to browse through colors in various ways to get their hex values.
  • Column Ruler – Numbers the text columns, indicates tab-stops, allows multiple column indicators.
  • DirtyGutter – Shows what lines have changed since last save.
  • Editor Scheme – Allows changing/saving the text area color scheme, including some nice presets.
  • ErrorList – Needed for a lot of the language parsers.
  • Finish Him! – Autocompletes words by parsing the current buffer.
  • Highlight – Allows highlighting the word under the cursor, or the selected word, etc.
  • JDiff Plugin – Awesome diff plugin.
  • MyDoggyPlugin – Better dockable manager.
  • Navigator – Allows you to go back to previous cursor points. Great for large files.
  • Optional – Puts all of the settings in one tabbed window.
  • Project Viewer – Allows the creation of projects. Great for quick access to all the files in your project.
  • SideKick – Needed for a lot of the language parsers.
  • TaskList – Parses the buffer looking for any TODO: or other task-based comments.
  • TextTools – Text manipulation tools. Allows re-ordering lines, etc.
  • WhiteSpace – Customization of the display and save-time actions relating to spaces/tabs.

That's just a quick overview of some of my favorites, but I certainly encourage looking at the rest. I particularly like Finish Him!, because unlike a lot of other autocompletion stuff, it just completes words, regardless of syntax, and it only does it when I use my assigned keystroke. Highlight is also great, as it can show you occurrences of a variable or other keyword throughout your code. JDiff is a really good Diff manager, I use it all the time. Project viewer is nice, too. A lot of other plugins integrate with it, like the SVN plugin for instance. Editor scheme is one of theose plugins that you sort of use once and then forget about, but it makes it easy to find a good starting point for your color scheme and then saving any customizations you do.

I mostly develop PHP using MySQL, CSS and JavaScript. Sometimes I'm working on XML/XSLT or Perl, or just doing some good old fashioned data processing. Tailoring jEdit to what you code is pretty much just a matter of choosing the plugins that go along with you language(s) of choice. The PHPParser plugin is amazing. Activate it, start coding some PHP, and hit save. It parses the buffer and highlights any syntax errors/warnings you have. It has saved me so many times. Similarly, there is PerlSidekick and many other language parsers. Some, like the XML plugin have other options like highlighting the opening/closing tag that goes with the one under your cursor, and automatically finishing the closing tag when you type '</'.

After all of this is set up to your liking, don't forget to check out the built-in features, like code-folding and it's excellent regex searching/replacing. The ability to split the text area in different ways is really handy for when you need to work on 2 or more areas in your code at once. Put your cursor just after a closing bracket in a block of code. Look at the gutter. See that line indicating where the code block started? Genius. It's such a simple thing, but it makes coding easier. I don't use them much, but there is also the Macro ability. You can do some really powerful stuff with the Macros.

And remember, just about everything is customizable. Don't like the toolbar buttons? Change them to anything you want. Change where things are docked, or make them floating palettes, if that's what you like. Change the keystrokes to whatever you want. Set up abbreviations that get expanded automatically. Change the context menu entries. I could go on and on, but I think you get the idea. If you can think, it, you can probably do it. Or if you know Java, you can make a plugin and contribute it. Don't you love open source?

jEdit Screenshot