I’ve said it before: I’m easily distracted. If my working environment is not just right, my productivity goes all to ratshit. And probably the single most important factor in this is the editor I use for coding.
I’ve been using TextPad for years — so long that I can’t even remember, but certainly since the late 90s. I love it because it’s super-fast, handles large files with ease, and doesn’t put a whole load of ‘handy’ features (which I’d never use) between me and the code. By now — after eight hours a day, five days a week usage — the keyboard shortcuts have become hard-coded into my consciousness.
Having said all that, for some time now I’ve been trying to find a replacement. There is a small number of additional features that I’ve been hankering for, for some time. Most notably, a code browser — i.e. an overview of (say) a class with all the methods listed. Many of the classes that we’ve written for our publishing framework are quite long now, with sometimes dozens of methods, and navigating the code quickly can be a chore.
I’ve tried more alternatives than I could possibly remember, from simple text editors to fully-fledged IDEs. There’s some really quite impressive free software out there (TSWebEditor, PSPad, Scite…) but I couldn’t get on with any of them for more than a few hours before going back to my beloved TextPad. And as for the commercial options (Zend Studio, Komodo, PHPEdit, UltraEdit and the like), none of them offered sufficient attractions to warrant investing my hard-earned cash.
I was briefly lured by the whole ‘real men use Emacs‘ schtick, but the vertical learning curve quickly convinced me (as if I needed convincing) that I’m not a real man. I want to use my editor to write code, not write code to use my editor.
I even flirted with Eclipse for a while (and its PHP incarnation), but quite apart from the (lack of) speed I just couldn’t get on with all the baggage that it carries. I’m sure it’s great if you’re working in some monumentally complex development environment with build processes and strict source control procedures and whatnot. But for hacking a bit of PHP it’s a sledgehammer to crack a nut.
So I’d all but given up on ever finding a successor to TextPad, clinging instead to the apparently vain hope that someday there might be a new version: although the developers insist that work is continuing on the software, the last update was released well over two years ago.
Then a couple of days ago I downloaded jEdit. I’d seen mention of it before, but ignored it because it’s Java-based: using Eclipse had convinced me that any Java software would be horribly resource-intensive and slow. But it seems that the newest version of the JRE (1.6 at the time of writing) has improved this situation significantly, so I decided to give it a go.
Now jEdit doesn’t do anything radically different from the many other editors/IDEs that I’ve auditioned in the past. But what I’ve come to realise is that I never really wanted to replace TextPad at all: what I wanted was TextPad plus one or two nice extra features. So when I’ve been trying all these other contenders, I’ve spent most of my time trying (and failing) to make them work the way I’m accustomed to — i.e. to make them look and act like TextPad. And the thing that jEdit offers in spades is configurability (if that’s even a word…).
For a start, every command in jEdit can be bound to whichever key combination you like. Then there’s a great big list of plugins that add all sorts of handy features — e.g. the code browser I’ve been after for so long — which can be browsed/installed/removed using the built-in plugin manager. And the macros, which can be recorded in real-time and then edited (they use the BeanShell scripting language) which gives you tremendous power. And I love playing with the code-folding (takes me back to my days coding AMOS :)).
It took some effort (reconfiguring keys, downloading plugins and editing macros), but finally I’ve got what I really wanted: something that looks and works almost exactly like TextPad, but better. It’s not perfect, but it’s the closest I’ve come so far.
Now if I could just convince my esteemed colleague to turn off AOL Radio, I’d be a really happy bunny.
PS. One other component in my perfect editing environment is Profont. It’s a monospaced font designed specifically for coding: it’s small (meaning you can get more code on the screen at a time) yet very legible.