Hacking TextMate

Hans-Jörg Bibiko decided he couldn’t wait for a real scripting API (i.e. allowing you to remote control TextMate) and wrote TMTOOLS, a shell command that works as a mini interpreter where the commands are all TextMate actions.

You can find the help file for TMTOOLS here and his latest mailing list letter about TMTOOLS here.

Speaking of hacking, Ciarán Walsh (maintainer of the PHP and SQL bundles, and contributor extraordinaire) recently started a blog with several TM hacks, for example to make the project drawer show Finder labels or Subversion status.

Also on his blog is a glyph input manager which add the functionality mentioned in the multi-stroke key bindings post but which does not require you to remember the arcane multi-stroke key bindings (Leopard users have a look at the release notes).

On his site, but not on his blog, is also a ReMate plug-in to disable the auto-updating of the project drawer (the feature that drives people working over network connections insane). Another approach to this problem is by Rob McBroom who recently announced a Remote Project bundle on the mailing list.

Disclaimer: With the exception of Rob’s bundle, the above is all based on undocumented functionality or using things in ways they were not supposed to be used, i.e. end user innovation.

18 Comments

  1. 12 Oct 2007 | # Michael Newton wrote…

    The SVN status indication is pretty cool, but being able to disable that project refresh is a lifesaver! I work regularly with files on a remote Windows share and that 3-5 seconds is such a pain.

    You must post more often, nearly everytime you do I have one of these epiphanic moments!

  2. 12 Oct 2007 | # Robert Shaw wrote…

    I'd really like to use the ReMate plugin, but he has only posted an Intel version of the Plugin. So I cannot use it (I have G4 machines). I can't seem to find any contact information for Ciarán to request either the source to his plugin, or to provide a Universal build.

    Can anyone help?

    Thanks!

  3. 12 Oct 2007 | # Ciarán Walsh wrote…

    I put up the ReMate plugin some time before I started the blog (a few days ago), so it’s just a basic page – I plan to blog it soon after I’ve made a few improvements/additions. In the meantime I’ve just updated the download link to a Universal build.

  4. 12 Oct 2007 | # Hacking TextMate « turnings wrote…

    [...] Posted by Daniel on October 12th, 2007 Hacking TextMate: [...]

  5. 13 Oct 2007 | # Phill Kenoyer wrote…

    A great way to speed up the project drawer is to set the delayed_ack to 0.

    Open up a terminal and type: sudo sysctl -w net.inet.tcp.delayed_ack=0

    Must faster now. ;-)

  6. 13 Oct 2007 | # shrek wrote…

    Ciaran, the ReMate plugin looks really nice, what I would personally like is to have it stick to the settings after relaunch. So I don't have to turn the refresh option off all the time.

    Thanks for some great plugins!

  7. 18 Oct 2007 | # jops wrote…

    Is there a way of hacking the find functionality into something any better?! I love most things about TextMate but finds are truly awful. It needs slickifying!

  8. 18 Oct 2007 | # Jacob Rus wrote…

    jops: you could fairly straight-forwardly put together your own command, call it "find", and attach it to ⌘F. Try it and let us know how it turns out :).

  9. 18 Oct 2007 | # Henrik N wrote…

    jops: Grep in Project overrides ⇧⌘F, so you should be able to do something similar for ⌘F (like Jacob suggested).

  10. 20 Oct 2007 | # Tolle TextMate Bundles at zHome wrote…

    [...] erschien im TextMate Blog ein Eintrag: Hacking TextMate. In dem Eintrag werden ein Plugins beziehungsweise Bundles erwaehnt, welche die Funktionen von Mate [...]

  11. 20 Oct 2007 | # tack wrote…

    ReMate!!! This solves the only real thorn in my side since switching from textmate.

    When I work from home, I access source over SSHFS/MacFUSE. I had to use BBEdit at home because the project refresh would give me a spinning beachball for 30 seconds or more. That sucked because I prefer TextMate Soooo much more than ol' BB'.

    Thanks Ciarán! Now I can TM at home ;)

  12. 20 Oct 2007 | # tack wrote…

    OOPS! I meant TO TextMate, not from.

  13. 21 Oct 2007 | # Greg wrote…

    Hmm,

    Great idea. Really wanna use it for MacFUSE but no matter what I do I get no menu item or contextual item. Installed and relaunched but nothing doing. I'm using a G4 but it's now supposed to be Universal. Does it need numpty instructions or are there some combinations of OS (10.4 in my case) and other applications that might cause it fail? This error shows up in Console:

    2007-10-21 19:44:39.562 TextMate[482] instance ReMate plug-in has no principal class

  14. 23 Oct 2007 | # Colin wrote…

    I'm getting the same issue as Greg. There's an additional error line. Together they are:

    2007-10-23 23:21:02.444 TextMate[11352] *** -[NSBundle load]: Error loading code /Library/<snip>/ReMate.tmplugin/Contents/MacOS/ReMate for bundle /Library/<snip>/ReMate.tmplugin, error code 2 (link edit error code 0, error number 0 ())
    2007-10-23 23:21:02.445 TextMate[11352] instance ReMate plug-in has no principal class
    

    I'm on TM r1431 on a G4, OS 10.4.10. This will be great if I can get it working… I would like to be able to use TM projects over SMB, WebDAV and SSH, but the delay has made it near impossible.

  15. 24 Oct 2007 | # Kent wrote…

    I'm also trying to use the ReMate plugin, and using an older G4 processor.

    Is anyone else having problems installing/using ReMate on the PPC architecture, or is there something else that we need to do to make the thing work for us?

  16. 30 Oct 2007 | # Stephen wrote…

    Ciaran, thank you very very much for ReMate, it has made using textmate a joy again and has stopped me pulling my hair out every day.

  17. 15 Nov 2007 | # TextMate Blog » TextMate Tips wrote…

    [...] indirectly plugged Ciarán Walsh’s blog in a previous post about hacking TextMate. Though it is worth mentioning it again, especially the TextMate tips [...]

  18. 15 Feb 2008 | # Troy wrote…

    ReMate has been updated – If you've found yourself here because, like me, you googled ReMate and found the old version, here's a link to the latest (as far as I know).

    http://ciaranwal.sh/2007/11/07/remate-update

    Happy editing!

Comments closed, you can use the mailing list for discussion.