TextMate's First Few Hours

Published 7 October 04 by Justin French, 5 comments

The response is definitely positive overall. People can see the value of it’s automation mechanisms, and can see that it will improve the way they work.

What people seem to be struggling with the most is the fact that it’s not like their current text editor. I don’t really understand why everyone was expecting TM to be just like the existing offerings. If TextMate was just like BBEdit or skEdit, there’d be no reason for its existence.

I was so excited and immediately blown away by TextMate because it wasn’t like BBEdit. TextMate is just a shell in which you can customise the editor to suit the way you want to work. Once I realised this, I stopped comparing and started thinking about how it could change the way I work. The results are amazing – I’m already noticing improved productivity, and I’m no longer frustrated by boring, laborious or repetitive tasks.

I urge people to step back for a second, explore the automation features, and think about how they can revolutionise the way they work, rather than just improve it or mirror it.

The way I look at it is this… TextMate isn’t “your perfect editor” right out of the box. Over time you will refine and shape it into your perfect editor by writing snippets, commands and macros that enhance the way you want to work.

Anyway, I thought I’d take a look at some of the “hot topics” from the mailing list, and put my spin on them.

No Preferences Panel

I knew this would be a hot topic. Perhaps it’s familiarity (every other application has one), or perhaps it’s just that people like to have all their options listed in one place, but I applaud TM’s ability to offer all this power without a 20 page preferences panel.

What isn’t immediately obvious (remember, most people have had this software for less than 24 hours) is that most of the “preferences” are replaced by learning and reflection. TextMate remembers that you like certain file extensions to map to certain languages. It remembers a lot of things actually.

I’ve always believed that good software doesn’t need preferences and config. files… it needs to learn, remember or just solve the problem properly in the first place.

They miss BBEdit or skEdit’s 2000 hard-coded HTML and CSS features

True, TM doesn’t have built-in auto-complete and context sensitive syntax suggestion yet. Personally I’ve never needed it, but I can see how some might rely heavily upon it.

I’m told that something like that will be in TM one day, but in the meantime, I encourage you to play around with the HTML features that were included in the default bundle (most written by myself as examples of the power available). Here’s a few tips:

  • Type “div” then hit Control-Space (the “Make HTML Tag 2” command) to convert that to <div></div> with the cursor sitting the middle of the two tags. This will work for any tag (even ones not in the HTML spec), so it’s great as a general XML/Mark-up helper to greatly speed up the way I write HTML. And for the few HTML tags which don’t have a closing tag (like img, br, hr, link & meta), it will recognise this and generate the correct tag (<br />).
  • Type “image” and press tab (the trigger for snippets) – TM will generate an image tag complete with all the main attributes like alt, height and width, and place the cursor inside the src attribute, ready for you to type the file name. Now press tab again, and you’re in the alt attribute. Press tab again and again to cycle through the height and width attributes. It’s that easy. There’s also an “img” version (no height and width).
  • Type ahref, mailto, table, tr or td and press tab. Same deal as the img snippet – time saving shortcuts to common, repeptive, boring HTML tasks.
  • Type <div><p><strong>Hello World! now press Command-Option-Period (.) a few times, and watch TM close off the open tags automatically (</strong></p></div>).
  • Type “about”, the press Control-Shift-L (for “Link”), and TM turns the word “about” into a simple link (<a href="about.html">about</a>)

Do we really need software to “suggest” tags based on context? Do we really need software to remind us that the <head> tags are not permitted inside <body> tags? I thought we were smarter than that – professionals in fact!

I don’t need my hand held like that… in fact, it would put me off. I just need quick ways to do what I know needs to be done, and customise it to exactly what I want/need.

Explore the default set of snippets, macros and commands, and start deciding what works for you. Remember, you can make your own, modify the ones that are already there, and delete the ones you’ll never use. They’re your features.

Syntax Highlighting

Most people seem to be gagging for a GUI to manage the syntax highlighting. I know something like this is planned for the future, but it’s important to realise that it’s quite easy for you to edit what we’ve put in v1.0 to suit your needs, and there’s plenty of people on the mailing list to help you write new definitions for languages like Perl, Python, JavaScript, JSP, etc. If you’re an expert at a language that’s not included in TM by default, please have a go at writing a new definition, just like I did for PHP.

There’s a lot planned for future versions of TM in regards to language definitions and syntax highlighting, but surely this is enough for you to see the power and flexibility on offer.

I Could Go On…

This post is getting rather long, so I think I’ll leave you with the following advice:

Forget what you thought was really helpful in your old editor. Instead, try and adapt to TM’s automation features. I found by forgetting BBEdit for a few hours (I even removed it from the Dock), I was able to see how TM was designed to work, and immediately fell in love… I will never go back to BBEdit.

Your mileage may vary of course, and remember that it’s impossible to think that one text editor (written by one developer) can please everyone – especially those who want TM to behave exactly like other editors in the market.

The key here is differentiation… find the editor that fits the way you work, and go for it — but don’t decide in the first 24 hours.

Options

What is this?

portrait of Justin

This is the online home of Justin French, a designer & web application developer located in Melbourne, Australia. I like finding ways to make things work better. I like clarifying and simplifying. I like to understand how you understand things.

» read more

Subscribe to my feed

Follow me on Twitter

@justinfrench

More Notebook Articles

Show more notebook articles

Search