TextMate News

Anything vaguely related to TextMate and macOS.

Beta 5 is here

More than a week has passed since beta 4, so I figured it was time for a new beta. As always (starting from beta 3) I’ll be mentioning the highlights of this new release in my blog (which is this one).

This is one of those (beta) versions where I (finally) implemented some (of the many) long-standing requests, like the ability to show invisible characters (tabs, spaces, newlines, and non-printable), created a command line utility so that you can more easily use TextMate as your $EDITOR variable in shell (for subversion commits etc.), and I made commands with output set to HTML “run in the background” which makes them much more useful for e.g. doing builds within TextMate.

Speaking of the latter thing (which I’ll spin as the highlight of this release) it means that you can call xcodebuild from within TextMate, set the output to HTML and pipe the result through e.g. perl to make the errors show as clickable links (as I showed could be done for PDF with the previous beta).

I created such a command (placed in the Objective-C bundle) which does exactly that, and as a bonus, if the build completes without errors, it plays a sample of a harp, otherwise a sample of a whistle (indicating that something went wrong). So basically the only thing for which you’ll need Xcode is to create the actual project (and maybe use the debugger). After creating your project in Xcode, simply drag the folder with it to the TextMate icon, and it’ll create a project with all the files, you can double-click nib files to open these in Interface Builder, you can do project-wide searches, and now you can even build your project all without leaving TextMate.

categories General


Nice! I think I can use this new stuff for Flash builds with ant and this compiler:

Who is up for the task?

What’s this new tm executable for and where should I put it? I scanned the release notes and couldn’t find any info.

I’d suggest you place it in ~/bin (but anywhere in your path is fine).

It is a way to call TextMate with a file argument from Terminal.app, or you can pipe data into the command instead of giving it a file, or give it multiple files/a directory to “create” a project.

The command will stall until the file is closed in TextMate (unless you call it with -a/–async) which is useful for those programs which call an editor to have something edited before continuing, e.g. commit messages for cvs/svn, your crontab etc.

So if you use this, you probably want to set the EDITOR environment variable to tm, and most shell utilities will then use TextMate instead of vim/emacs to do their editing :)

Thanks, Allan. I had a feeling it was something like this. Good to have it clarified.

11 February 2005

by Mike Powell

Oddly, the smart typing feature I requested still doesn’t quite seem to work. It ALMOST does. It no longer inserts two quotes when it should insert one, but it still sometimes inserts only one when it should insert two. This honestly solves 90% of the problem I had, as I don’t mind typing my own closing quote from time to time, so long as it doesn’t double on me. However, I figured I should mention that the behavior doesn’t seem quite right yet.

After some testing, it appears that the bug occurs when there is an even number of quotes to the right which actually have something between them. It also fails to insert a second quote when I try to type a quote while already in a string.

Anyway, thanks for building such an awesome editor. It was such a relief when I found this. BBEdit has been slowly falling behind the curve for 4 or 5 years now, but was still the best option on the Mac before TextMate.

Mike: I think the problem you are experiencing is because it will not auto-insert the matching character when the character to the right of the caret is a word character.

The reason for this is that some people type a sentence and then go back to add quotes from left-to-right, so for these situations, smart-typing would clash.

If you have an existing word that you want to surround with quotes, you can select the word and type a quote character (also works for the other auto-typing pairs) then it’ll quote the selection.

11 February 2005

by Mike Powell

I actually just realized that’s what I was experiencing, and was going to come back and apologize, when I found your comment to the same effect. :-)

will it be possible to have a standard cocoa toolbar in documents windows to have shortcuts to common operations ?

and “smart” indentation (for example, indentation which respect XHTML dtd/schema to know if tags have to be indented automaticaly if it’s valid in the context) ?


Michel: which common operations are you missing? when I didn’t make a toolbar it was because I really had no idea of which useful stuff to place in it. E.g. open/save are ingrained as cmd-O/S for most I’d think.

Regarding the smart indent, I’m not sure I follow you there with regard to having this follow a dtd/schema. Could you elaborate?

I usually hide those toolbars in text editing apps.

We do need a method/class/function/node dropdown though ;-]

I’ll second (or third, fourth…) the method/class/function/node dropdown ;-) That’s the only thing I really ever use in those toolbars in an editor… and the only thing I’m missing at this point. But I happily paid anyway!

Oh, and one of those panes that shows attributes/methods/etc of classes are nice too - essentially a graphic version of the drop-down.

But I can see that clashing with the (my perception of) general philosophy of TextMate. That’s also pretty far into IDE territory. They are handy when dealing with a huge class though (less scrolling and often more info at-a-glance).

The reason I’ve been postponing the function popup (which is one of the most requested features, together with split-views) is that I want to have the syntax definitions markup stuff like included files, function names/prototypes etc.

So basically the syntax file transforms the document into a tree (think XML) and a function popup is just a “query” so to speak (think XPath), likewise will styles be associated to elements using style sheets, and that’s also what the scope (in the bundle editor) is supposed to contain (a “selector”), so that activation of macros/commands/snippets can be limited to a given element (expressed using a selector), and the same goes for some settings (like enable spell checking for strings/comments).

So this should fit quite well into TextMate, i.e. very general and extremely flexible, with no particular language in mind. I can even use this system to markup my to-do lists and add some niceties I have in mind :)

13 February 2005

by Mark Patterson

The link to the new thing (http://macromates.com/textmate/files/TextMate_1.1b5.dmg) is only 38kb and is giving an error (no file system).

I’ve had a handful report this, I’m not sure what the problem is, but there has also been over a thousand successful downloads, so I don’t think the problem is with the server.

I’ll look into mirrors for beta 6, for now you can either try again (the size should be 1,704,255 bytes) or use this (crappy) mirror.

13 February 2005

by Mark Patterson

Thanks! Despite your resevations about that mirror, it worked.

A way to customize the text highlighting would be nice too. Or maybe I just haven’t found the setting…

One suggestion. I plan to use it for complex PHP programs.
“Toggle Foldings at Level” MENU. This feature is great but may we have more level ? After it will be perfect



Scotty: currently you need to edit the syntax files, but I’m working on making it better.

Florent: how deep is your code nested? :) you can actually extend the menu yourself if you know how to use Interface Builder, simply clone the existing items and change the tag value. But I can make it go up to 9 for next beta, since I guess it doesn’t hurt to have them.

Is the bundle editor still in the process of being fully implemented, or should it be functional in b5? I ask because I notice that I can use it to modify (at least) snippets, macros, and commands, but seemingly not languages (and I didn’t try templates or drag commands in my cursory check).

When I select any language to edit, the bundle editor just displays “No Language Editor Available” at the top of the edit pane.

Thanks in advance for any pointers or clarification, and keep up the good work on TextMate!

Dan: yes, there currently is no language editor component available in the bundle editor.

The 1.1b5 dmg doesn’t seem to work. I can download it, but attempts to mount it fail (no valid filesystems).

Odd…when I DL it with
curl -O http://macromates.com/textmate/files/TextMate_1.1b5.dmg
it works, but when I use Safari I get the tiny 328k image. Looking at it next to the full version, both are binaries which start out identically. For some reason Safari just ends early. Oh well, I have it now.