Textmate gem

As I said last week, I created thor while building a binary to handle my textmate bundles.

I wanted a way to install/uninstall/list textmate bundles like gems. Textmate already has a centralized svn repository for its bundles, and there’s a way, through AppleScript, to tell Textmate to reload bundles. The end result: a textmate binary that handles textmate bundles like gems.

$ textmate remote

Marcomates Trunk Remote Bundles
-------------------------------
ANTLR
ASP
ASP_vb_NET
ActionScript
Active4D
Ada
Apache
AppleScript
Bison
Blogging
Bulletin Board
Bundle Development
C++ Qt
C
CSS
CTags
CVS
ColdFusion
Context Free
D
Darcs
... snip ...

$ textmate remote JavaScript

Marcomates Trunk Remote Bundles
-------------------------------
JavaScript MooTools
JavaScript Prototype & Script_aculo_us
JavaScript YUI
JavaScript jQuery
JavaScript

Marcomates Review Remote Bundles
--------------------------------
JavaScript JSDoc
JavaScript MooTools
JavaScript Prototype & Script_aculo_us
JavaScript

$ textmate list

Application Bundles
-------------------
ActionScript
Apache
AppleScript
Blogging
Bundle Development
C
CSS
... snip ...
User Pristine Bundles
---------------------

User Bundles
------------
RSpec
Ruby Haml
Ruby Sass
Ruby
Rucola
Treetop

System Pristine Bundles
-----------------------

System Bundles
--------------
Ragel

$ textmate install

Checking out JavaScript jQuery…
svn co http\://macromates.com/svn/Bundles/trunk/Bundles/JavaScript\ jQuery.tmbundle /Users/wycats/Library/Application\ Support/TextMate/Pristine\ Copy/JavaScript\ jQuery.tmbundle 2>&1
A /Users/wycats/Library/Application Support/TextMate/Pristine Copy/JavaScript jQuery.tmbundle/Commands
A /Users/wycats/Library/Application Support/TextMate/Pristine Copy/JavaScript jQuery.tmbundle/Commands/Documentation for Word : Selection.tmCommand
A /Users/wycats/Library/Application Support/TextMate/Pristine Copy/JavaScript jQuery.tmbundle/Snippets
A /Users/wycats/Library/Application Support/TextMate/Pristine Copy/JavaScript jQuery.tmbundle/Snippets/each.tmSnippet
A /Users/wycats/Library/Application Support/TextMate/Pristine Copy/JavaScript jQuery.tmbundle/Snippets/clone.tmSnippet
… snip …
Checked out revision 9623.
Reloading Bundles…
Done.

$ textmate uninstall “JavaScript Prototype & Script_aculo_us”

Removing bundle...
Reloading bundles...
Done.

Pretty cool, huh? If you want it, do gem install wycats-textmate --source http://gems.github.com.

9 Comments so far

  1. Dr Nic on May 20th, 2008

    Cool idea.

    A bunch of tm bundles are now being cloned onto github and/or being hosted only on github. I name all mine xxx-tmbundle (e.g. hobo-tmbundle).

    Perhaps a search of github projects by *-tmbundle might be a bonus too? The UI might need to prompt for the actual bundle’s name (e.g. hobo-tmbundle -> Hobo.tmbundle folder)

    Might be fun.

  2. Dr Nic on May 20th, 2008

    Another bonus feature might be a bash autocompletion script for the textmate command. So many cool features :)

  3. [...] Textmate Gem - A new way to manage Textmate bundles. [...]

  4. Adam Sanderson on May 20th, 2008

    This looks like a great tool, thanks for writing it.

  5. Cate on May 20th, 2008

    Nice. Can it be configured to use /Library/Application Support/Textmate instead of ~/Library/Application Support/Textmate?

  6. [...] Thor improves Ruby’s support for scripting, and it was created while he was working on a Textmate gem for handling [...]

  7. [...] Katz Got Your Tongue? » Textmate gem Textmate already has a centralized svn repository for its bundles, and there’s a way, through AppleScript, to tell Textmate to reload bundles. The end result: a textmate binary that handles textmate bundles like gems. (tags: bundle gem ruby textmate) [...]

  8. [...] último sistema en llegar es TextMate Gem y te permite gestionar los bundles como si de RubyGems se [...]

  9. [...] Yehuda Katz, with help from others on github.com has released a ruby gem that allows you to install, uninstall and list TextMate bundles like normal ruby gems. This makes it very easy for those out there who aren’t friends with subversion. You can read more about it here. [...]

Leave a reply