emacs sucks.
Before the emacs lovers get on my case, for the record, I hate vi, vim, pico, and pretty much every other command line based text editor as well.
Like many developers, several times a day I fire up Terminal on my Mac to take care of a few things, mostly working with Subversion or Git. I don’t mind using Terminal for tasks like these, but for editing text, I absolutely hate it when I need to use emacs or pico. I can never remember the commands to do various things, and not being able to use a mouse for selecting text drives me nuts.
Every time I end up getting kicked into emacs by Terminal, I wish that I was using SubEthaEdit, which is my text editor of choice. I’ve known that those code monkeys had built a command line tool for working with SubEthaEdit (SEE) for a while now, but I never really understood what the point was until today.
I came across this old (2006) blog post by the SEE guys on how to use SEE for writing your commit messages in Subversion, instead of the default editor used by your system. However, using it in Subversion is great, but I wanted to use it for any tool, including Git. Using the instructions from the blog post above as inspiration, after installing the see utility from the preferences pane of SubEthaEdit, I added the following line to my .bash_profile file so that any tool that needs to display a text editor can access it:
export EDITOR='see -w -r'
Now, anytime a command line tool needs to have me edit a file, a SubEthaEdit window will pop open, and once I’m done editing the file, the command line tool will resume, and finish whatever it needed to do with the newly edited file. With Git, this works great, since all I need to type is git commit -a, and when SEE launches, the new window will be already filled with the details of the files changed in the commit, and all I need to add is the commit message.
Of course, once see is installed, you can also use it to open and edit existing files as well, just like you would with emacs or vi. I’m loving this so far, and no longer dread having to exit large amounts of text from the command line. I just wish I’d figured this out years ago when it was first available.



Nice Josh. TextMate has this feature too. Wish it could work when I ssh into a box.