A programmer is always looking for the perfect text editor, and today I found a new candidate.
For the last two years or so, I have been working with either SubEthaEdit (lean and mean, for general work) or JEdit (for heavy lifting).
The two big selling points of SubEthaEdit are its real-time collaborative editing mode, which allows for a distributed editor session over the network (unique feature, but I have never used it),
and instant HTML preview, which is quite snappy (updated as you type) and accurate (it uses Safari's rendering engine, so it also does CSS). The problem with SubEthaEdit is that it opens every file in a new window (which is not good if you have 50 files to work on) and that I am stuck with the old version because you have to pay for version 2.0 and up (did I mention I am only considering free-as-in-beer editors)?
I am quite satisfied with JEdit, but it is a little overkill to use outside of project work. Since it is written in Java, and packed with useful extensions, it is not really fast (although still much better than Eclipse, which is totally unusuable on my poor iBook). It also does not make use for Mac OS built-in goodies (like System Services, or spell checking), but those are minor complaints.
I have to edit files in different encodings (sometimes UTF-8, sometimes Shift-JIS), and so far every program I tried failed to auto-detect the encoding, so that having two different editors with two different default encodings is also useful.
The new kid on the dock is TextWrangler, by Bare Bones Software. Bare Bones is famous for BBEdit, which has always been the number one programmer's text editor on the Mac. The only problem with BBEdit is that it is not free. Back in the day (the OS 9 days, that is) I used BBEdit Lite a lot (the freeware cousin), but on OS X there have always been other, better free editors. TextWrangler is also a stripped-down version of BBEdit, and with version 2.0 became freeware. It replaced SubEthaEdit in my dock minutes after downloading. Except for the advanced web developer functions of BBEdit, TextWrangler inherited almost everything from its big brother, such as
- Open and edit files on remote servers (via FTP and SFTP)
- Syntax coloring and function navigation for ANSI C, C++, HTML/XHTML, Fortran, Java, JavaScript, Object Pascal, Objective-C, Perl, PHP, Python, Rez, Tcl, TeX, Unix shell scripts, and XML
- Runs shell scripts
- Integration with the Perl runtime (see POD, syntax check, debugger)
- Multi-file search and replace with (perl-compatible) regular expressions
- Can manage many files in a single window
One thing is strange about PerlPad and TextWrangler. While PerlPad appears in the Servives menu (even with its default hotkeys, which is rare these days and good luck considering how many keys are already defined by the application itself), for some reason it does not work. I have to look into this.