Tech Life My new favorite tool

Interview: Allan Odgaard

I’m coming up on five years of steady Mac OS X usage and anniversaries are a time of reflection, so I went back to read my first significant article about Mac OS X.

There’s something missing from this first analysis. See, there was one killer app that I’d been dying to try out on the Mac platform and the lack of any mention in this first piece is strange to me.

It was BBEdit, people. I’d been longing to seriously develop against this editor since a brief QA stint at Symantec in the early 90s and when the time finally arrived where I had a professional reason to do so, the editor just didn’t stick.

Yes. I’m doing less coding and more managing in my current incarnation, but I use some type of editor on a daily basis, so why the constant stream of semi-criticism of an application that so many people love?

The answer is TextMate. As I wrote about in Bright, Patient Design, this editor has filled the editor vacancy on my Mac OS X desktop and I was happy to interview its creator, Allan Odgaard, to learn more about the development of my new favorite tool.

RANDS: Tell us the story of the moment you decided to develop a new editor for Mac OS X.

ALLAN: It wasn’t a singular moment. It was having worked with the Mac for maybe half a year that lead me to the conclusion, that if I wanted to make shareware for the Mac, a text editor was something where there was no native offerings, so definitely a niche to fill.

It might seem I little harsh to say no native offerings, but everything based on NSTextView is generally not much more than NSTextView which, while one of the best text editors that comes with a GUI kit, is not a feature packed editor for the power user.

As for dismissing the Carbon editors which did exist: at that time Carbon did not support sheets and drawers, did not use the standard key bindings infrastructure, often used the older Classic spacing guidelines, etc. So for me (a “switcher”) they often felt a bit out of place.

According to Wikipedia, you did 5 months of development to get a 1.0 release out the door. How’d you pick the feature set for this first release?

It was actually more like four months though I had experimented with various editor related stuff prior to that, but did start basically with a clean slate.

At that time, the primary goal was to get something released, so the features were mostly determined from a “do we really need this for 1.0?” As motivation (for writing yet another editor) I did however need 1.0 to have foldings, snippets, and recordable macros.

How has BBEdit (or other editors) influenced the design and feature set of TextMate?

A few of the things which definitely did influence me when I wrote TextMate were:

  • CygnusEd: this is a very simple Amiga editor which I used a lot. It taught me the usefulness of recordable macros and how a few simple basic tools is generally better than specialized ones. As of such, you could say that initially I wanted to recreate CygnusEd for the Mac, but add features such as syntax highlight, foldings, snippets, and similar.
  • VisualAssist: this is a plug-in for MSVC++ and it adds things like auto-pairing of brackets, re-indented pasting, and a lot of other neat stuff. Before I tried this plug-in, I probably would not have touched such smart features, because I would think they got in the way. But VisualAssist blew my mind, and it still does!NEdit: I used this at the university for everything text related, and while I was not a power user, I once took a look at how it did language grammars, which it did pretty free form, and that has stuck and was my outset for TextMate’s language grammar system. Also, the ability to execute the current line as a shell command and move around a column selection, I loved that about NEdit as well and added that to TextMate.
  • A big non-editor inspiration was CSS selectors which is what I recreated as scope selectors. The first time I read the CSS specification I was pretty excited to try out the concept. Unfortunately I did not have access to any browser which implemented it, so I started writing my own implementation, though I never got very far with it. Still, a seed had been planted and on an unconscious level I have probably tried to find a place where I could implement them, ever since.

There’s something very satisfying that TextMate has built-in software update. Was there any special reasoning behind this feature?

Yes, this comes from me wanting to push frequent updates, but not inconvenience the user too much. If there’s too much manual work, the user might not appreciate frequent updates and might either choose to receive less of them or just feel annoyed.

That said, it was actually Nicholas Jitkoff (of Quicksilver fame) who was bugging me about having to do the manual work each time. But I wouldn’t have spent as much time on it had it not been for what I mentioned above.

Do you have a favorite pet feature?

What I really like myself about TextMate is the infrastructure, but there are two things which comes to mind, probably because they both act as enablers:

1. The ability to switch a normal selection to a column selection by tapping the option key once. For me that upgrades column selection from something I occasionally use to something I use dozens of times each day, even with columns that span only two rows.

2. The ability to have a command receive “current scope” as input. For me this exemplifies the abstraction I am pursuing with TextMate: you want a command to uppercase a string? Make the command (tr ‘[a-z]’ ‘[A-Z]’) and set the scope selector to ‘string’, input to ‘current scope’ and output to ‘replace’. While this action is contrived, it illustrates how everything unrelated to the task of ‘uppercasing the current string’ is irrelevant to the command. In all other editors (that I know of) you would have to write code yourself to find the string delimiters, and then you have the problem that these can be defined differently for different languages.

From your profile on the Wiki, you state you have a skepticism regarding the HCI field. Where does your skepticism lie?

Let me start by saying that I think understanding human cognition is very important for good software design. My skepticism about the HCI field comes from the fact that it is often hard to quantify the quality of results because a lot is subjective and subject for interpretation.

At one point I was semi-employed by a Ph.D. student (of HCI) which wanted me to log all sorts of data so that he could look for patterns afterwards. This is fine in some situations, I have just seen too much of it, and too little aggregated theory, instead there is a lot of common sense and a few authors making a fortune writing about it.

Do you plan to release TextMate as open source? If not, what’s your exit strategy, if any?

I am extremely torn on this issue. I have a lot of things I want to see happen with TextMate and there really is too much for me to do this all alone.

So one option is to hire programmers and basically build a company. Is this something I want to do? Maybe, but running a company requires a steady cash flow. Hiring good programmers can be difficult, and hiring a bad programmer can turn out to be worse than not hire anyone at all, but you will rarely know in advance.

It also requires me to spend time communicating my ideas and do a bit of micromanagement as I probably can’t just hire five programmers and say “make TextMate better” and expect them to know what that means.

On the other hand, the current model (where I do all the work) is not really working as in, it does not scale, and already I have people to help me out, not just for bundles but e.g. while I am on vacation I have other people handle support etc.

So the company slowly becomes a necessity. But you asked about open source, open source I have considered for a few reasons:

1) TextMate already has open source components and it occasionally bugs me that I can’t just point users at the source.

2) I said above that I don’t want to micromanage. When I delegate a job, I expect something specific and if I do not get that I might sometimes be a little disappointed. With open source I am not asking for anything, meaning I will get things I did not ask for, thus I will probably be positively surprised, and the things I may get, will sometimes be things which never occurred to me, thus even with infinite resources, I would not have asked for it (look at Microsoft, they have the closest you get to that, and they do not know what to ask for, so they do not get it, and thus have software which is bad and/or imitations of other products).

So what is stopping me from open sourcing TextMate? Basically two things:

1) if TextMate is open source, can I make any money?

2) if TextMate is open source, will people actually contribute?

Going the company route does not present these problems and I would be able to ensure that TextMate becomes what I have in mind.

Presently I am thinking of both things as possible scenarios, and I am consciously moving toward a modularized architecture that will allow me to test these things in a smaller scale. For example, making some modules open source while hiring people to work on other modules.

Do you have a feature roadmap and, if so, what are your big ticket features of the next six months?

As I mentioned above, the stuff which I get the most excited about myself is the infrastructure.

Things in TextMate are generally triggered when the user does some form of interaction. For example, pressing a key, dragging a file to the edit area, or typing a keyword followed by tab and then based on the structural context (e.g. are we inside a string in a source file?) which TextMate knows about from having parsed the document, some action will fire, like running a command or inserting a snippet.

This simple system has allowed a plethora of cleverness in the form of bundle items, and TextMate 2.0 (though the ETA is not within the next six months) will make the parser able to work with more complex document types, have scope selectors select more than just the structural context, have commands fire for more than just file dropping, key equivalents, and tab triggers.

These improvements to the existing infrastructure will allow for a lot of cool new things. I am deliberately being a little vague on what exactly they are since people have started to copy my ideas, which I have nothing against, I just want to be the first with the implementation.

The design of TextMate is one where you discover what you need rather than features being shoved down your throat. Isn’t there a risk here that a good feature might never be found?

Certainly. One of the reasons I do the screencasts is to educate users of features which might not be easily discovered.

But I don’t think it is a problem that users do not find specific (cool) features unless the feature they do not find is fundamental, like opening files, or something they miss and have spent more than 20 seconds looking for.

I do consider how features can be made more visible, but if you enumerate the features in TextMate there is probably around a thousand, depending on what you count, and most users would be hit by information overflow if all features had an equally prominent visibility.

23 Responses

  1. I definitely appreciate Allan’s screencasts. Textmate definitely does a great job of giving you all that “you want,” instead of everything “everyone wants” (the case with BBEdit) where you get nearly a dozen menu pieces, and a nearly twenty things you likely will hardly ever need listed in each.

  2. Oliver Taylor 17 years ago

    The screencasts were a major factor in TextMate’s success to be sure. For any other app, all you have to do to find features is hunt thru the preferences, menus, and toolbars, but TextMate has such a large feature-set you need an additional kind of instruction to really understand it’s capabilities.

    I’d be very interested to know just how influential TextMate’s screencasts really were, I distinctly remember them as being one of the first times I’d ever seen it done quite in this manner, and now they’re everywhere. Were there loads of screencasts before that I just wasn’t aware of?

  3. I just recently switched to Mac but one of THE killer apps on OS X is Textmate. I always was jealous of this great text editor and now I can’t think of another editor that’s so powerful and at the same time so uncluttered.

    Every OS X user should give Textmate a try and decide for their own, but I bet they will stay. πŸ˜‰


    P.S.: Nice interview, keep up the good work!

  4. I’ve sent Allan a few emails about different things, and you know what, he always responded. Of course this was early on (it might be harder to do this now with its growing popularity), but I really appreciated his commitment to his product.

    Friends are trying to get me to use IDEs all the time for php or javascript development, but when I have to wait a couple of minutes just to have the program open thats a waste of my time. TextMate is super quick, has all the functionality I need, and if it lacking something, I can usually just write my own bundle command.

    TextMate really makes working on a Mac a joy, even if the icon was the god of death for a little bit πŸ˜‰

  5. To me, TextMate isn’t so much a thing as it is a suit you can wear that turns you into a superhero.

    It doesn’t just do what it does. It alters the nature of reality, allowing you to do things and create things with more power than you could have imagined as a mere mortal.

  6. Eli Sarver 17 years ago

    One of the things that really sold me on TextMate was the use of it in all of the Ruby on Rails demonstrations. Since I didn’t know the keyboard shortcuts they were using in the demo, it looked like magic to me and made me need the editor out of its sheer slickness.

    -eli (proud licensed TextMate user)

  7. charles 17 years ago

    If Allan Odgaard reads this: I think you should not go the open-source route, at least not completely. What makes Textmate distinctive and focused is your brain (Allan’s brain) behind it. Definitely, letting it go open-source would make it go down the slippery slope.

    On the other hand, you consider opening some of the bits and keeping the overall architecture and logic under control, and that seems indeed like a good idea. You have already successfully shown that you can do that: you did it with all the different bundles. The way that you have organized the app also shows that you have a great sense of how to layout a general organization and logic that brings power and flexibility at the same time. I am quite confident that once you have fully thought out the details, you will be able to choose the right parts to open-source, and/or the right plug-in architecture.

    I know, lots of compliment. Sorry, your talent and vision seems so obvious from using your app…

  8. rev_matt 17 years ago

    Back in my Windows days I was an avid fan of HomeSite (before Macromedia destroyed it). The one thing I was lacking on the Mac was a killer text editor. I tried everything, and just a few months ago ran across TextMate and that was it. Killer, killer app.

  9. Robert D. 17 years ago

    You know, an alternative to open-sourcing TextMate or becoming a company could be to have bounties. Allan could say, “I need someone to implement feature X and the person who turns in the best code gets it merged and also gets twenty bucks.”

    In this way, the project is kept small and agile, people who are interested in developing for TextMate can do just that, Allan can let the best code win and if he doesn’t like the entries (or doesn’t get any good ones), he can still just implement it himself.

  10. do not start your own company. just sell textmate to apple for say

    4 million dollars and then retire to ireland for counting sheeps…

    that would lead to a great life for you and a complete vanish of for all.

  11. Great interview! I hope TextMate stays away from open source. I think most users will be more than happy to pay for Allan’s vision for a long time to come.

  12. Michael StrΓΆck 17 years ago

    I absolutely love TextMate, and I also was turned onto it by some Rails demo. There are some big “WTF!? How did he do that?”-moments in most of the TextMate related screencasts, though πŸ™‚

  13. I’m sorry, but I’m constantly amazed by the love for this app. As a Perl programmer, I think it’s terrible, and I’ve yet to find a single good editor on the Mac. Nothing comes close to something like UltraEdit or even better – Editplus – running under Windows. Nothing at all. They all make the same mistakes, have the same broken features, or are horribly slow in comparison to a Windows editor under half the machine power.

    Witness Textmate’s handling of tabs, which are only valid within a project. Imagine if Safari made you open a project just to put a website in a new tab, would that be good design? Of course not.

    My solution at the moment? Parallels running Win2K and a copy of Editplus. It’s the only way I can get any work done.

  14. @Richard: The handling of projects is just great, because you don’t have to use it — the way I work with TextMate is to say “open .” in a shell somewhere and get an editor frame with all of the folders navigable. Much, much better than Ultraedit or any other editor on Windows I’m aware of.

  15. @Stefan – But I don’t work in projects. All my scripts are on remote servers and are opened via FTP. I normally have about 40 tabs open in Editplus, all different scripts on different servers, unrelated to each other. No Mac text editor makes this a simple proposition and if they do they’ll screw up something else, like not doing true autoindenting of braces.

    I don’t understand why I’m allowed to do Command+T in Safari and then go off and open whatever I want, while in Textmate I’m forced down this route of compartmentalising all my work into different areas first. That’s simply bad UI design, offering distinct editing states for no good reason. Textmate has many other problems, that’s just one of them.

    Nobody would ever be happy switching from Ultraedit or Editplus to the Mac, because they’ll never find anything comparable. Komodo is about the closest, but even it has issues.

  16. I’m an ex-UltraEdit user, and I think TextMate kicks it into a corner and calls it names ! The tab commands alone are a huge timesaver – UE never had anything like that when I was using it. UE has also become a bloated mess, whereas a TM window is about as uncluttered as you can get.

    Everyone else at my work is using Eclipse. I think they are nuts – why would I want 2/3 of my screen taken up with toolbars and other panes. I like to see as much code as possible, and TM lets me do that. I discover new features almost every day ( eg. the fact you can type a quicksilver style shortcut when using the Command-Shit-T navigator)

    The only feature I really wish (every day!) that TM had is split window panes – I frequently need to seem two parts of the same file at the same time.

  17. Just for those you overlooked this great article to increase their productivity using TM:

  18. i use editPlus when on my pc laptop. love it.

    but prefer my mac and textMate. i do a lot of

    PHP and SQL.

    not sure if it is a “killer app” but it beats

    BBedit for me (which i used for years).

  19. @Richard: Project handling is one of the major areas Allan is working on for 2.0. Though since it’ll be Leopard only, it won’t work unless you upgrade. And it gives him quite a few more months to work on it, so don’t expect it until Leopard is released at the earliest.

  20. Thanks for the interview. TextMate has proven to be the most important piece of software I’ve recently purchased for the mac platform.

    I had no idea that Allan was even remotely thinking of open-source as possibility for TM.


  21. TextMate is the not perfect, I’d even argue the price was a bit steep. But I don’t regret buying it at all. It took a while to drop TextWragler for the change in workflow, and the current tabbed implementation is as mysterious as the drawer in TextWrangler, but TM launches fast and makes doing my work more OS X-like and transparent.

    I’d like to see a way to turn off unused bundles to reduce the size of menus.

  22. sapporo 17 years ago

    Regarding open-sourcing TextMate: I disagree with Charles – open-sourcing TextMate would not necessarily “make it go down the slippery slope”. Open-sourcing your app does not mean giving everyone commit rights. Most successful open-source projects are led by a “benevolent dictator”, who keeps close tabs on what goes into *their* project.

    While I do not have an answer to Allan question regarding the business model, I’d love to see TextMate open up. Maybe Allan could go the Safari/WebKit route – open-source the text editor component (the NSTextView replacement), but keep the application itself commercial. This would allow other projects to use the excellent editor component, including other competing text editor apps, but I assume most power users would still want to use the original TextMate.

    If the editor component was licensed under GPL, Allan could prevent commercial competitors from using it. Of course he could still license it to commercial competitors for a fee if he wanted to do so. And once it dominates the market (GPL or not), Allan would of course be the leading expert and would surely not starve..

    There’s lots of options to be considered!

  23. I have to say I’ve been trying to enjoy my licensed copy of TextMate over even Text Wrangler but I think I’m going to have bring a sack lunch to work for a bit and pony up for BBEdit after all. Text Mate’s advanced options and even its tabs make almost zero sense to me and even slow me down when editing html. Fine product, but not how I work.