Developing Java software on a Mac: text editing

For the largest part of the Java development work, I use of course an IDE. As I mentioned in the previous article in this series, the major IDEs, such as Eclipse and NetBeans, run on a Mac without problems. But apart from an IDE, a lightweight but capable stand alone text editor comes in handy quite often. Of course OS X comes with TextEdit, that is comparable to WordPad on Windows. It’s a simple word processor with the capability to edit plain text files. It can do the job, but it lacks some programming-oriented features.

So I started looking for an additional text editor. Since I use such an editor only as additional tool besides my IDE, I’m not willing to pay (much) for it. On Windows, there is a plethora of free or cheap text editors available and although the number is lower, there are quite a few good options for the Mac as well. I picked a few for evaluation…


Of course there is jEdit. Being open source and written in Java, it instantly gets some sympathy points from me. However, it suffers from a common problem of cross-platform applications: the user interface feels non-native on every platform. It seems this distracts even more on the Mac platform, where slick design is the standard. On the other hand, jEdit is very versatile and the project exists for many years, still releasing updates regularly. The editor isn’t very lightweight though, and it can take some time getting used to. All in all jEdit is a capable editor and I keep it installed on my system for some special functionalities offered by some of the many plug-ins that are available. (You should browse the plugin directory to get an idea of the huge amount of plug-ins.) Despite all this, jEdit didn’t become my favorite text editor for everyday text editing…

The classics

A text editor overview is not complete without mentioning the “classics”: VI and Emacs. Being a Unix operating system, Mac OS X comes with the command line versions of Vim and Emacs pre-installed. They’re accessible by typing the right command (vi or emacs) at the OS X Terminal. I’m not a huge fan of either, but I do use Vim occasionaly when I want to view a file or do some minor editing from the command line. But if you are a fan of one, it is good to know that GUI versions of both editors are available: MacVim and Aquamacs. And if you ever try one of the command-line versions and you don’t know how to exit: VI can be quit by typing a colon (:), followed by ‘q’. If that doesn’t work, you might have to press ⎋ Esc before typing the colon and/or you might have to add an exclamation mark (‘!’) after the q. Emacs can be exited by typing Control-X followed by Control-C. (That is ⌃ Control, not ⌘ Command!) So to round up this section: I only use the command line version of Vim occasionally and I don’t feel the need for installing a GUI version of one of those classic editors.


Smultron is a Mac-only editor. What I understand is that it was quite popular a few years ago. Back then it was developed as an open source project and was available for free. The open source development stalled in 2009, but the last released free version can still be downloaded from Smultron’s Sourceforge page. It seems to work, even on OS X Lion, although I didn’t test is very thouroughly. Recently, Peter Borg announced the reincarnation of the Smultron editor as a commercial product in the Mac OS App Store. Two versions are available: version 4 is for OS X 10.7 (Lion) only, while version 3.8.4 also works on previous versions of Mac OS X. Both versions cost US$ 4.99, which Apple converts to € 3.99 in the European App Store. I did not test the commercial version, as I found a good free alternative (see below). However, some features of the new version 4 sound attractive: Smultron seems to be one of the first Mac text editors to support the new Resume, Auto Save and Versions features of OS X Lion. Maybe I’ll give it a try someday…


A very good and free text editor on the Mac is TextWrangler from Bare Bones Software. The company calls it the “little brother” of their BBEdit product. While “little brother” sounds as if we’re talking about a rather limited product, TextWrangler actually is a very capable and versatile general purpose text editor. (It seems the BBEdit product, priced at US$ 39.99 at the moment, is targetted at web-developers to be used as their main editor.)

Apart from the usual features, like line numbering, syntax highlighting, advanced search and replace, TextWrangler even has an excellent compare tool, that handles file-to-file as well as directory-to-directory comparissons. (The compare tool is somewhat hidden though, it is reachable via the menu: Search > Find Differnces….) As with Smultron, TextWrangler is written exclusively for Mac OS, so it integrates really well with the system and it sports a slick look and feel, just like other Mac OS applications. For now, TextWrangler is my favorite text editing companion for every day use.


Well, this is clearly just a personal evaluation of some text edit options for the Mac. There are way more options available, but I didn’t have the time to evaluate them all. There’s a list of Mac text-editors on Wikipedia, although the list isn’t updated since October 2006. Various other websites publish such lists as well. I want to stress that I just mentioned my personal favorites here and I wouldn’t dare to say that one solution is better than another in general. I hope you enjoyed this article. Please feel free to share your experiences with any of the mentioned editors or any other editor.

Leave a Reply

%d bloggers like this: