A Few Good EditorsMarch 28, 2005
Having had such great success with the low-key discussion about development platforms (see Why the Switch? and the 35+ comments on our move from .NET to LAMP), I thought I'd move on to an even less controversial subject: text editors!
Most PHP development is done using text editors, though full-fledged development environments are becoming more common (see Zend Studio and PHPEd). This is obviously a substantial change from our experience with Visual Studio .NET (of course, nothing would prevent you from writing .NET code in a text editor either).
In the past, I would have spent a great deal of time researching the best editor and standardized across our development team. However, I fought that mental battle while trying to settle on a desktop OS for the team and finally came to what was, for me, a radical decision: let go.
Rather than operate by command and control, I decided to let go of these choices, which are very personal ones for most developers, and empower my team to truly own their desktops and development environments. For obvious reasons, they don't each get to choose their own language, but I've come to the conclusion that day-to-day development cannot be driven by a one-size-fits-all approach.
My first experience with this was a silly one: FTP programs. I thought it would be a good idea if we all used the same one. No one had a strong preference, so I did some research and chose the tool. A few months later, our designer convinced me that each member of the team could be trusted with this important decision, and would be much happier with the tool of his choice. Choosing your own tool also carries with it a certain responsibility to master it, without the excuse that it wasn't your choice in the first place.
So, I've been trying out a number of different editors (primarily for the Mac, but many of them are cross-platform). Here are my favorites so far:
BBEdit (Mac, $200) > industrial-strength editor (also from Bare Bones) with many workflow and Unix enhancements; offers code styles for HTML, CSS, and PHP. Everyone's favorite Mac editor, but it is not cheap.
Quanta Gold (All platforms, $40) > Well-done editor with syntax highlighting, built-in preview and FTP, and contextual PHP documentation.
Vim (All platforms, free) > I never thought I'd say this, but I love Vim! This is the terminal text editor of choice for fast, keyboard-driven, low-overhead coding. I first used Vim (and its relative, Vi) fifteen years ago and its been been favorite each time I return to Linux or, now OS X (yes, over its main rival, Emacs).
But, however cool Vim is on its own, it becomes way cool with the addition of a configuration file from Tobias Schlitt. This file brings line numbers, PHP auto-completion, fast code templates, and innumerable other additions to make Vim a terrific PHP editor. Highly recommended!
Mastering Vim or a similar default *nix text editor is a huge benefit no matter what as it is excellent for server configuration and remote changes to web files. This is my current preference, but I can imagine obvious limitations down the road. And who knows what the rest of the team will choose!
I know that are many diverse opinions on text tools, so feel free to share yours.