A Personal Journey in Editing Programs

Over the past year or so, I’ve spent a bit of time tinkering with text editors. It feels like I woke up one morning and was simply dissatisfied with what I was currently using. It certainly wasn’t disgust, because I largely like the tools I use. But I felt it was likely there were better tools out there, and that I should give them an honest try. The grass on the other side might be greener.

So I went through liasons with VIM and a couple with Emacs. The first left me feeling disconnected, like I had ideas but I couldn’t even make them appear on the screen, let alone run. My experiences with Emacs are better, but have always felt somewhat awkward. I suspect that at some point, I could be a full-blown Emacs person, but right now, I’m just an aspirational Emacs guy.

I’ve used a myriad of editors in my time. I started with jed, a small-ish Emacs clone, then graduated to full-on Emacs. By way of viper, I migrated to VIM. Then I picked up BBEdit, because I wanted more direct manipulation of text, and less of a never-ending learning curve. I was pretty quick to jump on TextMate, seeing a great fusion of the Mac and Unix aesthetics.

I still think TextMate is as close as it gets to an ideal situation. And yet, it falls short enough that I tinker with VIM and Emacs, two editors that can easily be labeled powerful but extremely lacking in the visual and conceptual aesthetics departments.

I suspect my mismatch with most of these editors is due to something about my habits, the way I like to work with programs, and the kinds of programs I work with. Emacs’ notions of major and minor modes doesn’t play well with markup files with three different languages embedded within. VIM is efficient for those who have internalized it and hostile to everyone else. TextMate is easy to get started with and pleasant to extend up to a point, but seems to have fallen victim to its creator’s perfectionism.

For a long time, I’ve adhered to the philosophy that one should choose one text editor and learn as much about it as possible. Increasingly, I’m starting to think that there is no panacea, no “one true editor”. TextMate is great for working on web apps and easy to extend. Emacs is really wonderful for functional programming languages, especially those with REPLs and languages that are LISP-shaped. And some kinds of development demand an environment more like Smalltalk browsers than text editors.

My journey for editing bliss probably won’t end anytime soon. In the future, I suspect that it’s going to be a spectrum of tools depending on the work I’m doing. It could be that the days of personal text editing monoculture are over.

6 thoughts on “A Personal Journey in Editing Programs

  1. Brett

    What I left TextMate for was better file finding and buffer switching. There is so much more to a “text editor” than the editing part, imo. TextMate really falls short once you want to go to another file in the project.

  2. I’ve found that TextMate, in general, is weakest wherever you can’t write a bundle to solve a problem. That said, I’ve found that all of the reasonable ways to navigate to other files in a project emulate exactly what TextMate does.

    Out of curiosity, in what ways does it fall short for you and what editor does a better job?

  3. Brett

    I haven’t tried many bundles outside of the “official” contrib ones you pull down with svn, which are mostly language syntaxes (are those even considered bundles? I forget).

    TextMate’s “Go to File” only takes filename (not path) into account. This falls down quickly in any project where you have a lot of files by the same name (__init__.py, models.py for what I do day to day).

    I suppose anything could be solved by a bundle, but is it easy to write one? How big is the community? I know TextMate has tons of users, but most aren’t tinkerers, to my knowledge. Vim has a fuzzy file finder that is pretty solid, Emacs has tons of options. I’m an Emacs user now (I’ve use all 3 for years, though) and simply do “C-x t” and type any part of the filename/directory to select a file inside my project (which is automatically found by the .git directory in the base).

    Honestly, I’ve customized Emacs so much now (and do so at least weekly) that I’d have a really hard time switching to anything that wasn’t fully (and easily) programmable. TextMate’s only advantage is a lack of learning curve, and considering how much time I spend in Emacs (and Vim previously) I consider those worthy investments.

  4. In my opinion, if one has a bunch of files with the same name, that’s your own fault and not something one should blame on the editor. Sleep in the bed you made and all that.

    In my recent stints with Emacs, I’ve been impressed by the utility of ido. It’s solid stuff, though sometimes it seems to freak out and go sideways. But it seems that, unless one has an extremely well oiled and maintained Emacs (or any editor) setup, it’s just the messy nature of the beast to go sideways.

    It’s interesting that you note that TextMate has no learning curve. I think it’s deeper than that. TextMate is very conceptually lightweight. You’ve got a buffer, you move the cursor around, you make edits. That’s it. There’s no notion of windows and buffers and regions and registers and bookmarks. There are no command modes, no motion keys, no prefix commands. No arcane syntaxes, no macro languages. It’s just me and my text.

    Given a long-enough timeframe, I suspect I will someday count myself as a full-time Emacs user. At some point, using it will feel like I’m directly manipulating text. But right now when I use it, I feel like I’m running commands on text, and not putting my actual hands on the stuff. TextMate has that feeling of direct manipulation that touch and gestural apps do.

    In short: Emacs and vi are a keyboard and mouse, TextMate is poking at objects on a glass screen.

  5. I’ve found that TextMate, in general, is weakest wherever you can’t write a bundle to solve a problem. That said, I’ve found that all of the reasonable ways to navigate to other files in a project emulate exactly what TextMate does.

    Out of curiosity, in what ways does it fall short for you and what editor does a better job?

  6. Amy, right now oscillating between TextMate and Emacs. The former is simpler, but sometimes I find the cognitive load of thinking about exactly which file I want to switch to is enough to take me out of my programming place. Emacs is not as straight-forward, but right now I’m finding the ability to split multiple files in one window and do so across projects pretty indispensable.

    That said, odds are that within weeks, I will have pivoted to some other approach. Stay tuned.

Comments are closed.