There are lots of text editors on the Mac. I’ve narrowed it down to two editors at this point: BBEdit and emacs. They each have pluses and minuses.
emacs is great if you don’t ever want to pick your hands up off the keyboard. There’s a keystroke set for everything, and modes for editing just about any kind of file. It’s also infinitely customizable, especially if you know Lisp (knowing Lisp is, in itself a good thing, but that’s a subject for another post). Equally important, it’s free, and it runs on just about any system (Mac, Windows, Linux, BSD, other Unixen). So why don’t I just run emacs and be done with it?
BBEdit has the polish that emacs lacks. It’s much better integrated with the Mac environment, and it has support for things like projects (opening a set of files at the same time). It also works much better with a mouse, which can be good for some kinds of editing.
So which editor should you get? BBEdit (or its free sibling, TextWrangler) if you don’t already know how to use emacs. emacs, if having your fingers do all sorts of walking is the way you like to edit files.