TextMate News

Anything vaguely related to TextMate and macOS.

TextMate Tricks

Time for another round of links to cool stuff related to TextMate.

Multiple Arbitrary Simultaneous Carets

Duane Johnson, who should already be known for his many Rails bundle contributions (which started as syncPeople on Rails) has taken it upon himself to implement requests that I turn down. His wish? To have multiple arbitrary simultaneous carets, so that he could type once, and have the text inserted multiple places.

It sounds like something only direct access to the text editing core would allow, but not if you are creative. Witness his MASC bundle (well, it’s actually his TextMate bundle, but he refers to this part of it as MASC). There is a screencast which shows it in action, and it looks very smooth!

WebMate — Editable HTML Preview

James G. Speth had another itch to scratch (actually two, but only one can be downloaded from his website). The ability to make the web preview of TextMate editable, so while you can currently edit the HTML source and preview that, you can’t edit the preview, and have the source updated accordingly. Well, say hello to WebMate, a plug-in which allows just that!

Edit in TextMate from Apple Mail

Hawk Wings notes that TextMate can be used as external editor for Mail. Although I myself am behind this feature, I haven’t made any mention of it outside of the release notes, but it is actually quite nice.

As noted on the blog, you need to install the Edit in TextMate input manager, which is done by clicking the gear menu in the status bar (inside TextMate), navigating to the TextMate submenu and selecting Install “Edit in TextMate”…

After that, relaunch Mail, and it will have a new item in the Edit menu, which allows you to call up TextMate for the current letter (in the compose window). If you are using the cutting edge version of TextMate (presently r985) or have the Mail bundle from the subversion repository, you will get syntax highlighting of quoted text, and ⌃Q will be overloaded to reformat text respecting quotation levels, plus a few other niceties, e.g. ⌃{ inserts [...].

Note: This only works in Tiger. Also note that this is essentially a hack, and I of course make no claim to its suitability for any purpose etc. The source for the hack (input manager) is available from the bundles repository.

PyTestMate — Supporting py.test

Timothy Grant has added support for py.test in the form of PyTestMate.

Trick Your TextMate: Snippets

Garrett Domon has put up part two of his Trick Your TextMate series.

PHPfi Lookups in TextMate

Bob McDonald describes how to make PHPfi lookups from TextMate. This allows access to the PHP documentation even when offline, as the default Documentation for Word in the PHP bundle uses the online site for PHP. This of course requires that you have PHPfi installed.

categories TextMate Tricks


I don’t get syntax highlightling for quoted text using the mail bundle. I have the latest version and all other bundle feature seem to work correctly.

It’s a great hack, I’ve been hoping for one for a while. Should save me a lot of time responding to similar emails, using some snippits.

Peter: Is the language set to Mail? Does your quoted text look like normal quoted text, that is:`

double quoted text
single quoted text
`If it does, and the language is Mail, what shows in the tool tip if you press ctrl-shift P on one of the quoted lines?


The language is set to Mail, and the guoted text looks as you described.

I get the following tool tips whne pressing ctrl-shift-p:

When using ‘edit-in-textmate’ with gmail both single and double quoted lines give the following:


Using it in mail single quoted lines:


Double quoted:


in all cases there is no highlighting, I tried different themes as well to make sure it wasn’t just my eyes.

Ah, come to think of it, I actually do not think any of the themes address the quoted text scopes, except MagicWB.

You can go to Preferences -> Fonts & Colors and add a style for markup.quote to color the text. If you want different quotation levels to have different colors, you can make multiple entries (a catch all for markup.quote, and then a new style for markup.quote.double, etc. Use ctrl-shift P to find the names).

As fro GMail, it sounds like the grammar doesn’t parse GMail’s quoting style. I will check that out later and update the grammar accordingly.


Worked perfectly, thanks! I personally don’t care about Gmail compatability. I was just seeing if it would work.

Hey thanks for the mention. I just wish my contribution was even half as cool as the others. ;)

“Edit in TextMate” is fabulous.

I write my blog using WordPress, which I love, but whenever a post gets long enough that I don’t want to keep typing into a browser window, I just hit Ctrl-Cmd-E and get all the cool HTML features.

Very nice - thanks. Oh, and I did this post the same way :-)

When I use file encoding ISO-8859-1 and write “æ”, “ø” or “å”, Safari stops responding when I save in TextMate.. Why? I got it to work with UTF8.

ole: Could you be more specific? E.g. provide steps to reproduce.

08 May 2007

by Bernhard

Just a note: The “Edit in Textmate” InputManager does prevent using the keyboard command Apple-C to copy text from a Skype chat history list. Disable the InputManager just for Skype by typing “defaults write -app Skype DisableEditInTextMateMenuItem 1” in a Terminal window to make Command-C working again.

This is totally awesome! Thanks

Thank you Bernhard ! It’s been driving me nuts not been able to copy with Apple-C in Skype..

Btw. The link for WebMate doesn’t work anymore. The link to the zip is: http://end.com/~speth/WebMate.zip. (Taken from https://wiki.macromates.com/Main/Plugins)

that WebMate link is dead…

My use of texmate is blossoming. However, I find that edit in textmate, which is so important, fails to engage spelling when editing text in a blog comment form (from safari)m although spelling works in the actual textarea in safari. Larger comments replies in small windows are better edited in textmate of course.

Is this case of no spell check in temporary docs true for you, or a known limitation generally?

john: You can toggle “Check Spelling as You Type” from the Edit → Spelling menu.

Allan: Yes sure, I am familiar with that. It didn’t work in a temporary file, under the circumstances. I shall have to test again, though, I am fairly certain there were corrections to be made; but the TXM templates colouring may have obfuscated the signs. And yet, I am sure I called up the suggestion box. Oh well…let’s hear from others. I’m for a spell of sleep now.

john: For source code, it will only spell check string literals, so it might be, that you have the language set wrong. Look in the status bar and switch it to Markdown (or plain text).

27 April 2009

by Matthew J McNeil

any possibility of also checking spelling in source code comments?