2006-09-20

The continual hunt for a better code editor

I am a Vim user. Have been for about 4 years now. I have enough muscle memory that when I want to indent code I naturally reach for ^T. Hell, I spent my first day at PyCon this past year writing a script (contained in Misc/Vim) that auto-generates a python.vim file for syntax highlighting (and I unfortunately didn't think of getting it into Vim 7 so I don't know up-to-date the distributed one with Vim is).

But I am not a Vim zealot. While I do take sides in the old Vim/Emacs wars, I am not married to Vim. If there is a better editor out in the world, then so be it and I will use it. This means I need to try a bunch of editors.

I have decided to try a different editor each week until I exhaust my list of code editors on OS X. I am trying out XCode right now. I have BBEdit, jEdit, nvu, Smultron, SubEthaEdit, TextMate, and TextWrangler also on the list of editors to try. The only requirement to make the list is that it be on OS X natively (and not have crappy performance on my PowerBook like Eclipse), it have support for editing Python and C (which is why Wing is not listed), and it is not some old, complicated UNIX editor (i.e., no Emacs since I am trying to move up to a more modern editor).

So far XCode has been okay. The code completion can be nice. Syntax highlighting is minimal for Python. And the auto-formatting is kind of annoying (e.g., trying to create PyMethodDef entries w/o it automatically starting a new line and indenting, which I do want for 'if' statements and such). Plus the keyboard shortcuts are not great. Unfortunately I realize that I will have to use it if I ever get into OS X programming. Luckily it seems to support launching an external editor if desired, so I should be able to get it to either launch gvim or vim itself.

Anyway, if anyone has suggestions on other editors to add to the list, let me know. Or if any of the editors I listed really are not that great I am willing to prune the list down as well.

And if I don't end up finding a new editor, I will evaluate the code completion for Python under Vim 7 and if it isn't good enough I might try rewriting it (it's actually written in Python which is why you need the interpreter compiled in). Will probably also finally move up to gvim. And finally, I will pull my act together and get a vim cheat sheet for commands pulled together (might make it part of my web site to make it easy to reference anywhere). Hell, might even get into cscope or ctags.