achat viagra pharmacie paris 
acheter viagra pour homme puissant 
vente de viagra sur paris autorise 
generique du viagra inde 
viagra efr 
achat viagra generique en ligne 
achat bviagra ben bligne 
cialis generique en pharmacie 
viagra super active plus 
achat de viagra par internet 
vente viagra ou cialis prix 
acheter viagra paris 
prix viagra en pharmacie 
cialis 5 mg quelle est le prix 
levitra 20 mg prix 
acheter en ligne viagra comprar-levitra-generico-en-farmacia viagra et generique achat viagra générique sildénafil citrate compro viagra on line differenza cialis viagra levitra ricetta medica vendo viagra milano viagra pillen shop cialis generico mg vente libre viagra espagne receta viagra casera veritable cialis sildenafil soft mg cialis generico venta espana

How To add “Open folder in Textmate” to Finder Context Menu

I wanted to add a menu item in Finder’s context menu that would open the selected folder in Textmate.
Textmate context menu item: Open selected folder in  Textmate

A google search suggested the method described by K. Adam Christensen on his blog: “Opening a directory in TextMate from Finder“. However, from the documentation, I learned that that method is now outdated. Snow Leopard users should use “Services” and not “workflow” for setting this up.

Here is what I did:


From the menu item “File” > “New” choose “Services”


Now there are 3 steps to be filled out like so:

Automator final setup for "open in textmate" context menu itm
First, edit the top so that “Service recieves selected: files or folders in“.

Second, add the action “Get Selected Finder Items” from the left column (use the search field to find, then drag selected into the right work area).

Third, add the action “Run Shell Script” to your service. Fill in the following command:

cat | xargs mate

Finally, choose “File” > “Save…” and give it a name like “Open in Textmate”

9 Responses to “How To add “Open folder in Textmate” to Finder Context Menu”

  1. Joe Alba Says:

    Great tip! I’ve been looking for this feature for a while now.

    But for some reason, it isn’t working for me. I followed the steps, but this service does not appear when I right-click a folder.

    I checked my ~/Library/Services folder, and the service I created was saved as ‘Open in TextMate.workflow’

    Got any tips that could help me out? Does your service wind up with the .workflow extension also?

    (I’m running Snow Leopard — upgraded from Leopard, not a fresh install.)

  2. Daniel Says:

    Nice tip, but somehow the folder or file I selected in Finder appears twice in the Textmate drawer. Do you have the same problem?

  3. Jesper Rønn-Jensen Says:

    @Daniel. Actually yes I have the same problem. Please let me know if you come up with a fix !

  4. Barbara Hofmeister Says:

    Google is most popular and the fastest search engine. adding this kind of facilities will increase its popularity.

  5. Adam Says:

    To fix the “double” loading issue:

    In the “Run Shell Script” Automator action, in the “Pass Input” drop down, change from “to stdin” to “as arguments”

    Change the script:

    cat | xargs mate

    mate $1

  6. Scott Says:

    Thanks Adam, that solved the double-loading issue for me as well.

    Also, for whatever reason, the workflow wasn’t picking up my $PATH variable, so I actually had to enter:

    /usr/local/bin/mate $1

    as the shell script. Other than that, though, works like a charm!

  7. Open folder in Textmate | Elink Media Says:

    [...] Share this article [...]

  8. Jeff Says:

    Hey there:

    Thanks for the tip. I’ve written a version of this workflow that uses slightly fewer steps and also works with paths that contain spaces. You can check it out here:

  9. Henrique Says:

    Great tip!

    Using what Adam and Scott sad, but with the argument surrounded by double quotes avoiding problems with path that contain spaces.

    /usr/local/bin/mate “$1″