Review: TextMate

TextMate

TextMate is not just a text editor for Mac OS X, it’s ‘the’ text editor for Mac OS X. Or at least if you believe the hype. Created by self-confessed UNIX geek, Allan Odgaard, TextMate has quickly risen to the top spot when it comes to Mac editors and now enjoys a somewhat charmed life in the glow of developers the world over. So the question is, what makes TextMate so special? Let’s have a look.

Generally speaking there are two reasons why TextMate has been able to push so many people’s buttons. Firstly, common conventions are elegantly handled by TextMate’s intuitive interface. In short, the software does a lot of things for you without getting in the way. Secondly, when you open TextMate you’ll notice it consists of a window and a standard Mac OS menu. The UI is certainly simple to look at. There are barely any icons or visible features at all. Yet underneath this there are so many features packed in that it is comparable to any other fully-featured text editor. You could say that its simplicity embodies David Heinemeier Hansson’s mantra, ‘convention over configuration’.

There are quite a few features TextMate that undoubtedly increase your productivity but yet are easily missed. Column Selections is one of them.

Column Selections

Columnar editing example

If you press alt, the mouse pointer turns into a cross. You can use this to select rectangular regions. This particular feature is very useful when editing HTML. For example, you may wish to add a <div> around a group of elements. To keep your indentation, hold alt, click, and drag down in a straight line. At this point, whatever you do will be multiplied on each selected line.

Quick access from the terminal: mate .

This is a great feature for those who came to Mac OS from a UNIX background. And it certainly makes your life easier. To use it, navigate to where your code’s directory is in the terminal, then type:

mate .

This opens a TextMate instance with a project containing all the files in the directory you specified, and its subdirectories.

To set up the command line tool, go to Help → Terminal Usage… from within TextMate.

Find in Project (cmd-shift-f)

This feature will come into its own during an intense re-factoring session. ‘Find in Project’ enables you to search through every file in the project for a pattern. You can enter regular expressions and replace text from the same dialog.

Search for a file faster using cmd-t

We think this feature will single-handedly be responsible for the most significant increase in your productivity once you start using TextMate. Press cmd-t to open a window that enables you to search, in real time, for any file in the project. Any letter you enter is matched, so you don’t need to enter ’controller’ to find every controller in your Rails project. Like the others this feature is simple but immensely useful.

The file search window when using cmd-t

Bundles: ctrl-escape

The bundle list

Bundles are basically collections of macros (these are called bundle items). Press ctrl-escape to bring up the bundle menu. Your current language (if applicable) will be selected from the list, and then you can easily use the keyboard to select the macro you want to use. For example, when writing PHP code you may often use this to type the names of the predefined variables, such as $_REQUEST['variable']. With this example, TextMate will automatically select ‘variable’ for you, so you can enter the variable you wanted with little effort.

Another way to access bundles is to use tab triggers. With tab triggers just type the trigger and then press tab (as in the example below). The trigger is replaced with the bundle item text. Using the previous example, you can type $_ and then press tab to bring up a list of PHP’s predefined variables.

A list of matches for a tab trigger

Even if you’re the type of person who would normally shy away from creating bundles and adding snippets, don’t worry, TextMate makes it easy. Go to Window → Show Bundle Editor. If you open up a bundle from the list, you’ll notice several icons next to the names of the bundle items. These icons represent the types of bundle items you can add:

  • Commands – use scripts to do various things in TextMate, including: replacing text, inserting text and showing tooltips
  • Drag Commands – helps TextMate handle you dragging something into the editor
  • Languages – helps TextMate work with a given language or document type
  • Snippets – pieces of text to include into your document, including: code to run at the insertion time and TextMate variables (such as selected text)
  • Templates – use shell commands to generate new files based on a template
  • Preferences – helps the editor adapt when different settings are required for the current file type

We found it was best to start adding snippets for your common coding tasks. This helps you get used to working with bundles. TextMate’s help section has all the information you need to create bundle items, including the syntax for snippets. Just click on the question mark after you’ve created a new snippet to find out more (see the example below)

Finding help for snippets is easy

Handy bundles

You may want to use TextMate to write weblog entries. Many weblogs and content management systems generally use Textile, so it’s nice to be able to
preview Textile before inserting the text. To do this, select Textile
from the bundles menu. There’s also a shortcut key set up for this bundle: ctrl-alt-cmd-p. However, you must have Textile selected as your language to use the shortcut.

TextMate also has bundles that help with version control. Many people use
Subversion, so the TextMate Subversion bundles menu is obviously very useful. You can commit changes and view diffs with very easy to read syntax highlighting. All of which will add to your productivity.

Macros

The software also has support for traditional macros and in true TextMate fashion they are extremely easy to use. You can activate and save a macro by pressing alt-cmd-m. Then, to replace the macro you just created, press cmd-shift-m. You can save the macro to the Bundle Editor by pressing ctrl-cmd-m and to view the available options for macros, look under the Automation menu.

What’s the downside?

We’ve talked a lot about what’s great with TextMate, but in which areas does it fall down and where can it be improved upon? There’s a few interface issues: it doesn’t handle lots of tabs very well and the distinction between macros and bundles confuses new users. Undo behaves differently to many popular editors — when you press undo it reverts changes letter by letter, rather than a set of changes. Many editors for Windows and Mac OS support FTP and SFTP, but TextMate only does through another FTP client (Personally, I use Panic’s Transmit.) This could make using TextMate awkward for you if you’re used to having this feature.

If you’re using TextMate to access files on a remote filesystem, there’s a few glitches that occur: TextMate can stick as it polls the remove files when you bring it into focus. This can unexpectedly change the position of the files in the project draw. Finally, there’s no way to search for text within a directory, you can only search an open file or across the entire project. Project searching works 90% of the time, but can produce too many results for a large project.

Community, support and themes

Certainly one of the ways in which TextMate has captured the community’s imagination is through its support of plugins and themes. You can easily change the software’s behavior or color-scheme which is if you want to personalise your prefered working environment and workflow quirks. Another boon is the TextMate community and wiki which are good places to find plugins and themes, as well as the User Submitted Themes list.

TextMate also works with many popular Mac OS X applications.
For example often you may need to login quickly to a server and change a script. In this case you would open Transmit, ctrl-click a file and select ‘Edit with TextMate.’ This opens the file in TextMate and automatically uploads the changes when your save it.

Another thing that sets TextMate apart from its rivals is its promptness in replying to support e-mails. When writing this review we emailed the support team with a query about how TextMate handles Mac OS X’s remote volumes, and they promptly responded. Generally, it’s rare to encounter this level of support with online software.

In conclusion it’s clear thatTextMate does deserve the applause it has been getting from certain camps. And once it has perfected the handling of tabs and working with remote files, it will be nigh-on perfect.

Rating

  • Software name: TexMate
  • Maker: Alan Odgaard
  • Price: 39 Euros ($47, or £27)
  • Rating: 4 out of 5

Free Workshops

Watch one of our expert, full-length teaching videos. Choose from either HTML, CSS or Wordpress.

Start learning

Comments

0 comments on “Review: TextMate

  1. Pingback: TextMate « Aldoblog

  2. Pingback: Lindsve.net » Review: TextMate

  3. Pingback: I Blogged This » Blog Archive » ThinkVitamin.com is Live!

  4. @Matt Baron: Macs don’t have an “alt” key.

    Take a look above your option key, Macs do indeed have alt keys.

  5. Pingback: Tu Hai Fiducia Nel Pop » Blog Archive » Vitamin

  6. Poor BBEdit, I’ve been using TextMate off and on since it’s release. I’m having trouble saying goodbye to BBEdit, I’ve been using it since OS 8. It’s hard to deny that TextMate has some really great features that just make sense.

  7. Pingback: Arbited » Long live plain text, Part II: Text editors on Mac OS X

  8. Textmate is my editor of choice and I highly reccomend it. This review barely brushes the service of what TextMate is capable of.

    Here are some of the features I can’t live without.

    * Instant SVN access by pressing command-A
    * shift-option-command-V reveals TextMates own clipboard history
    * option-command . autocompletes tag sets
    * command / toggles commenting on the current selection

    And there are a ton more nifty keyboard shortcuts baked right in to the application and the different bundles. If only the documentation offered a more palatable way to discover them.

  9. I should have mentioned clipboard history, I actually use that quite a bit when I’m juggling blocks of code.

    I think you’re right about the documentation not being palatable — it’s sometimes hard to see why particular features are useful in context. I find looking at the wiki more useful than the documentation.

  10. Great review and, of course, great product. I was still stuck using Dreamweaver (code view) on the Mac as my default editor until this sucker came along. Brilliant product.

    My only wishlist item for it would be for them to implement a global find/replace on par with TextWrangler (can’t speak to BBEdit, as I don’t use it). I still don’t feel as comfortable as I like with their current “Find in Project” feature. With TextWrangler, however, I love the ability to easily modify what files to add to my extended find/replace, the feedback offered, etc.

    On the FTP front, anyone have any pointers to Transmit/TextMate hacks/tips of note?

  11. Pingback: tijs.org » Blog Archive » TextMate

  12. Pingback: The Whole Widget » Blog Archive » TextMate Review

  13. Nice review! I’m a complete TextMate convert.

    I just have one little pet peeve. I don’t think you should italicize TextMate every time. It looks like I should read each sentence with an odd emphasis on TextMate all the time.

    Also, I suggest that everone install the latest Bundles which will add support for a ton of languages and add updates for the languages it already supports.

    Keep up the good work, guys!

  14. I love TextMate, but that sticky, SBOD causing, project drawer bug is driving me up the wall.

    I use NFS to access the files I’m working on. Every time I switch my focus back to TextMate, it’s a 2 second wait and I lose my position in the file. It has been a bug for many months now.

    I have switched back to VIM until it gets fixed….and if it doesn’t get fixed soon, I’ll probably never go back.

    VIM is a really good editor, I just wish they used Cocoa for it instead of Carbon.

    Why is there a major, show stopping, flaw in almost every application? The only application that I’ve ever purchased that I don’t feel like I’ve been ripped off is NetNewWire.

  15. Nice. Just lost my post.

    Anyway, I didn’t know about the cmd+t trick, I’ll have to try that.

    I’m personally really loving TextMate. I can’t really describe why, though. Just using it for evaluation, it’s like it slowly wormed its way into my workflow, until, when my trial finally expired, I could not switch back to TextWrangler. Everything about TextMate seems to focus on getting out of your way and letting you write more code. It’s truly great.

    Including, of course, that it doesn’t devour memory like it’s going out of style. A single TextWrangler window with 20 open files would consume ~200MB, TextWrangler, I have 3 windows of 20 files each, and it’s hovering around 70MB. Yay, I have memory again!
    :)

  16. There’s one reason I’d like to love TextMate too but can’t.

    When I edit files off my remote server (w/ Transmit) in BBedit, I get “tabs” of the files that I’m currently working on. I can switch between files that way.

    In TextMate to have tabs, however, you have to have a “project” which, if I understand correctly, means that the files have to be stored locally or you have to do some hacks to get it to think they are.

    I just want plain tabs, I don’t need a project.

  17. very simple tool, love it’s simplicity.

    i’m a big fan of SKEdit but i think i’ll definitely switch as the support and the ease of use rocks.

    also running it from the command-line is one great idea.

    tabs would be a plus though, or something to easily cycle thru the files open?

    all the best,

    John.

  18. John, TextMate can use tabs when you’re editing a project. Go to File, New Project and then drag files into the project drawer.

    When I’m working on rails projects I seem to always just do “mate .” in the command line, but for some large projects or projects that consist of several elements it can be easier to create a project manually.

  19. Dan, John,

    If you open a folder of files in TextMate, you will get get the drawer populated with the contents of the folder. That way you have easy access to the files and will end up with tabs as you open more files. (Either drag a folder to your TextMate icon or type mate thePathToDirectory into the terminal)

    You can also easily cycle through the open tabs byslecting them with cmd+1, cmd+2 etc. Beautie!

    I’ve recently discovered TextMate and now hate using anything else. That’s a shame as I’ve just started a job that requies me to develop on a windows machine. Nothing comes close to TextMate for windows that I have discovered. Booo!

  20. I love the cmd+# shortcut for tabs.

    Phil, UltraEdit in Windows isn’t bad, but if you compare it to TextMate on the Mac you notice two things:

    1. TextMate really shines because of some of the standard interface widgets Mac OS gives it, vs the clumsy hacked-together Windows UI stuff, and:

    2. TextMate caters for very common conventions, meaning things often “just work.” Configuring UltraEdit took me ages.

    I’ve found putting the effort in to learn Vim worth it. It runs on nearly anything, and there’s a nice plugin called “Project” that makes it feel a little bit like TextMate.

  21. I have the same problem that Dan has but I don’t think anyone has actually resloved, The project view cannot be used with a remote server and there doesn’t appear to be a way to have tabs without it ( and actually I’d like to have the other functions of p[orject but remotely )

    If this was ever added I’d move away from my windows box with jEdit but since I work exclusively remotely for development I just can’t use it :/

  22. There’s a clumsy way to do it:

    1. Connect using your FTP/SFTP client (i.e., Transmit or Cyberduck)

    2. Open the files you want to edit using an external editor (TextMate in this case). The documents will open in new windows.

    3. Create a new project.

    4. Like Finder, TextMate allows you to drag the icon from the title bar. So drag each document’s icon into your project’s folder.

    5. Now you can use tabs.

    You have to leave all the windows open, but you can always hide them. This solution is slightly clunky, but I’ve used it for a few projects where I had to work via a SFTP server.

  23. Pingback: TextMate | Macropsia

  24. Hi, I understand the interest in bbedit and the other editors given their Mac integration. However, they actually seem to be feature poor.

    However, there is an awesome, rock-solid, feature-rich, highly customizable, incrementally-learnable, all powerful editor called SlickEdit.

    http://www.slickedit.com/

    The Windows version is fully integrated with Windows and excellent on UNIX/Linux too. It has won accolades in both worlds. I won’t bother to repeat its features here since you can google them.

    Now the Mac story. A few years ago, I kept asking them for an OS X port (because they have a UNIX version, such a port should not be so difficult). I don’t know if others were pulling. And The Mac community think, I should, give them credit for taking the time to port it to OS X.There were not a lot of OS X users clamoring for it. Unfortunately, SlickEdit has not gotten a lot of coverage from the Apple press/world. That’s no doubt due to the catch: it’s an X 11 application: not a cocoa one. The other issue with SlickEdit it that it has a high price tag, but you get what you pay for… But if you’re a UNIX geek with a software budget, give it a whirl.

    I should also make a plug for Poplog VED editor, which we recently ported to OS X.

    It’s at:
    http://www.cs.bham.ac.uk/research/projects/poplog/freepoplog.html

    The editor is integrated with a bunch of AI libraries and the Pop-11 programming language (as well as LISP, Prolog and ML). (No, Pop-11 has nothing to do with Mail, it’s an open stack-based object-oriented programming language with an extensible syntax, (partial or complete) closures, procedures as first class data structures, incrementally compilation [it's not interpreted]). However, unless you’re willing to learn a powerful but old language, and can cope with non-cocoa, then you won’t go for this one.

    For specialized IDE’s such as Java IDE’s there are only 2 real choices IMHO: IntelliJ IDEA (if you’ve got the $) and Eclipse (if you don’t).

  25. Luc, the reason SlickEdit will not get accolades on OSX is because it is an X11 app. That means it is barely a port. If it were a Cocoa based app, it could very quickly and easily take advantage of lots of goodies built in to the OS. (services for one)
    Take a look at the things that BBedit and TextWrangler and TextMate all do take advantage of in OSX itself.

  26. Not only is SlickEdit an X11 app, it’s a $300 X11 app. I’m sure it’s quite powerful and that if you use it on another platform you may be addicted to it, but at six times TextMate’s price (and three times BBEdit’s cheapest price!), it’s just about going to have to read my mind to have a compelling enough feature set. :)

    The more I learn about TextMate’s “bundle” capability, the more impressed I am; I don’t think I’ve seen another editor that’s more easily extended outside of Emacs. There are still a few features I miss from other editors–splitting the window into panes, most notably–but TM’s design is overall astoundingly well-considered.

  27. TextWrangler vs TextMate:

    This is off topic, forgive me? X11 is so within the spirit of open source software that I am at a loss to understand why everyone is so eager to dump it. All X11 applications regardless of underlying machine architecture) will run on any X11 client. From my home I can VPN my work machine and bounce the Sun (Motif GUI) debugger off my PC. Ditto VIM, ditto OpenOffice.

    If the app is written to the Cocoa or Carbon GUI, said app is locked onto that one Mac box. I know that the bandwidth must be very high in order to obtain good response time from an X11 client, but high bandwidth is the direction that we are moving.

  28. Pingback: JDHarper.com » Fantastic New Text Editor: E

  29. Pingback: Wolf’s Little Store » Textmate goodness

  30. Noticed someone in this thread complaining about the lag you get when you switch focus with Textmate. We’re working on a large project at the moment and I’ve been noticing the same problem. I’ve posted a solution on my site, it involves installing a plugin called ReMate.

    This won’t be a problem in 2.0 though, so let’s hope Leopard comes out soon!

  31. Pingback: mcdave.net » links for 2007-10-09

  32. I like textmate as well, but I can’t get passed the lack of sftp and other necessary tools. To have to buy another application such as transmit to get this functionality makes me keep going back to dreamweaver’s code view editor which I hate.

    Fortunately, there is now Aptana, http://www.aptana.com – enjoy

  33. Pingback: link

  34. Pingback: windows vista product key finder

  35. Pingback: winning at video poker

  36. Pingback: kostenlos poker spielen ohne anmeldung

  37. Pingback: card chase com credit

  38. Pingback: descarga de juego de poker

  39. Pingback: approval canada card credit instant

  40. Pingback: credit card debt management uk

  41. Pingback: cellular customer free ringtones us

  42. Pingback: torneos de poker

  43. Pingback: aprender a jugar poker

  44. Pingback: jeu de poker gratuites texas

  45. Pingback: boite de jeu poker

  46. Pingback: poker tour gioco

  47. Pingback: boost free ringtones free ringtones for boost phone

  48. Pingback: jeux baccarat en ligne gratuites

  49. Pingback: download free mosquito ringtones

  50. Pingback: download ringtones verizon wireless ringtones verizon wireless

  51. Pingback: jeu du poker

  52. Pingback: draw poker

  53. Pingback: b9e90d7291db

  54. Pingback: stacker 2 ephedra

  55. Pingback: Geek 2.0 — Jonathan Rass » Blog Archive » TextMate - or: I fell in love with a text editor

  56. Looks pretty useful, even more so than Notepad for Windows.I've been increasingly interested in macs , so this comes in handy!Thanks

  57. Looks pretty useful, even more so than Notepad for Windows.

    I've been increasingly interested in macs , so this comes in handy!

    Thanks

  58. Nice review. Do i have something wrong in safari configuration if i see these chars(â€â) in the article? Thanks.