Muffinresearch Labs by Stuart Colville

Use Tabs in Textmate for Files Opened Via Transmit | Comments (37)

Posted in Software on 13th June 2006, 9:30 am by Stuart

Screenshot showing tabs in textmate

I really love TextMate. Everything about it oozes productivity. The only thing that I could say I didn’t like was that there was no way to edit remote files in textmate (opened via transmit) using the tabs. That is up until now.

Tabs in TextMate are only available when you are using the projects feature. Opening a file with textmate by default opens in a single window. Thus if you use Transmit and set Textmate as your default editor every file you open via transmit will open in a separate window. This is fine but if you are working on a large project switching back and forth between windows fast becomes a pain.

I went onto the textmate IRC channel today and I was asking to see if there was any way round this problem. Someone very kindly pointed me in the direction of this thread on the textmate discussion board: [TxMt] sweet textMate FTP project window goodness!

This thread was posted by Thomas Aylott and details how to open the temporary files in tabs when using CyberDuck and Textmate. Here’s how to carry out the same method with Transmit. Allan Odgaard, the author of TextMate, helped me sort this out so thanks go to Thomas and Allan for making all this possible, I am purely documenting this so that if anyone is looking for how to do this is should be easily found.

The How-to

First off transmit doesn’t use one directory for it’s temporary files so you need to watch the parent folder. You will find this here:

~/Library/Caches/TemporaryItems/Transmit/

aka:

/Users/<your_username>/Library/Caches/TemporaryItems/Transmit/
  1. In Transmit set textmate up as the default editor. See screenshot
  2. In TextMate open a new project.
  3. Click on the cog icon in the project drawer and selet “add existing files”. See screenshot
  4. Then find your way to the ‘/Users/<your_username>/Library/Caches/TemporaryItems/Transmit/’ directory as detailed above. Set this as the directory and click ‘open’. See screenshot
  5. Next select the transmit directory that’s visible in the project drawer and click the info button (i) at the bottom right of the project drawer. See screenshot
  6. Delete everything shown in the ‘folder pattern’ field and close the window. See screenshot
  7. Close the project drawer. You can leave it open if you wish this is a personal preference.
  8. Save the project file! Give a useful name like ‘transmit’. If you don’t save it then this special config will be lost and you will need to repeat these steps.
  9. Lastly open a file directly from transmit and you should see the file open in a tab. See screenshot

There you have it. Next time you want to use this simply open the transmit project file (you did save it right?) and start opening files from transmit and they will be opened straight into tabs.

Post Tools

Comments: Add yours

1. On June 19th, 2006 at 10:31 am Arthur Case said:

Great article, thanks!

I just had one issue where I was attempting to find the TemporaryItems folder after a fresh reboot and it wasn’t there. Just opening a file via Transmit made this folder appear so I could add it to the project.

2. On June 20th, 2006 at 12:50 am Freddy Fredland said:

Yeah hi … this is such an obvious step forward. This is one of those functionalities that you never really think through on the white board, but someone like yourselves throws out an Ah Ha moment. Thank you for the work around. If TextMate is listening … one small step for your product … one giant leap for the developer world.

High five.

3. On June 23rd, 2006 at 11:12 am Nick Harris said:

This is the sole reason that I use BBEdit over Textmate. I tried your technique, and it works once, then the TemporaryItems folder disappears. I can’t even get it back by opening a file from transmit :(

4. On June 27th, 2006 at 7:14 am Henrik N said:

Only worked once for me, too. Closed TM and Transmit and then tried editing two files - they opened in separate windows, without tabs.

Some very quick testing suggests it only works if the project is currently open in TM when you invoke “edit in TM” from Transmit.

5. On June 27th, 2006 at 8:35 am Stuart Colville said:

@Henrik: I did say (see the last paragraph) that you will need to open this project every time you want this to work! For me TextMate opens this as when I open TextMate as it’s the last thing I had open.

If you are having trouble with the TemporaryItems directory being cleaned up you could try creating a readonly file and dumping it in there as a kludge to prevent it dissappearing. YMMV.

6. On July 6th, 2006 at 7:59 am Thomas Aylott said:

Total. Kludgy. Sweetness. ;)

Yee haw!

7. On November 22nd, 2006 at 2:11 am Michael Jackson said:

Thanks for documenting this useful tip! I was thinking about switching back to BBEdit just because I thought TextMate lacked this feature!

8. On December 22nd, 2006 at 4:27 am Ryan said:

Mmmmm…this just helped me out quite a bit tonight. I have BBEdit but it’s just so damn ugly and not-fun. I use ExpressionEngine a lot these days, so I edit files remotely more often than I used to. I thought this might be a TextMate killer for me.

This tip, paired with the TextMate ExpressionEngine Bundle make me feel as if I’m editing on my local machine. Thanks!

9. On January 14th, 2007 at 9:14 pm idea said:

THANK YOU. I had horrible thoughts of going back to DreamWeaver, simply for the lack of the tabbed organization. I feel much better now.

10. On January 17th, 2007 at 2:56 am Ryan said:

What do you do when this stops working? I’ts been working fine for a few weeks, and then all of a sudden, it stopped. I open TextMate, then open the “Remote Project”, then open a file from Transmit - and it opens in a new window rather than the Remote Project window.

I’ll tell you, the remote editing is one thing BBEdit has over TextMate…

Do I just make a new remote project all over again? Any help getting it working again is appreciated.

11. On January 17th, 2007 at 9:36 am Stuart Colville said:

@Ryan: Hmmm I’m not sure why that happens but the quickest thing is to just recreate the project.

I totally agree with you that it would be nice to just have a setting that opens all new files into a new tab but who knows maybe that will happen in the next version?

12. On March 4th, 2007 at 7:23 pm Jasper said:

thanks very much for this tip. I tried Subethaedit, but its lack of file browser put me off. Skedit’s cool but its syntax colouring it a bit rubbish. This has just made TextMate the winner for me! Hopefully we’ll see future versions have an ftp drawer like Skedit :)

13. On March 16th, 2007 at 10:06 am Erwin Heiser said:

Thought I had found the solution to the one problem I stil have with Textmate but this just won’t work for me. I can’t believe that something which is trivial in BBEdit is such a pain to pull off in Textmate :(

14. On April 6th, 2007 at 8:57 pm Neil said:

A lifesaver (well, not quite, but almost)! Thankyou!!!

15. On April 22nd, 2007 at 4:26 am tom said:

Yeah, but you lose all directory information. Everything in random .tmp folders is useless when working on a Rails project, for example.

16. On April 22nd, 2007 at 11:56 pm Stuart Colville said:

@Tom: not quite sure what you mean. Feel free to explain in greater detail the problem you are experiencing.

17. On April 25th, 2007 at 7:50 pm Dallas said:

I think I have the same problem tom mentioned. Using this method you can only see filenames and not the full ftp/sftp server path. If you have code with multiple files with the same name in different directories, it’s difficult to tell them apart. BBEdit shows the path up at the top of the window and makes it easy.

I keep waiting for the time when I can seriously consider switching to TextMate and this tip gets me a whole lot closer, but without the ftp path I think I have to keep waiting.

18. On May 1st, 2007 at 7:55 pm Danny said:

This worked for a couple of weeks for me, then the TemporaryItems directory vanished. I recreated it and the Transmit dir inside it, restarted Transmit and now it’s working again.

19. On May 3rd, 2007 at 7:58 pm Danny said:

The TemporaryItems directory continues to randomly disappear I guess I’ll have to go back to separate windows until this is built into TextMate. Bummer.

20. On May 16th, 2007 at 3:44 pm Gaston said:

This is fantastic. With the whole CODA boom right now, I’ve wondered why in the world I would need to use it… and the only reason was to edit files comfortably from http://FTP.

Whith this little hack, I see no reason at all to keep on using CODA. It’s a great product, but it’s light years behind Textmate as a Text Editor (light years, really).

Thanks so much for this.

21. On May 23rd, 2007 at 5:28 pm Rasmus said:

OR, you could use FuseFS (Mac-version maintained by Google) to mount a remote tree over ftp with write-access. Alas works exactly like a local file tree. Very neat. Very convenient.

22. On May 25th, 2007 at 12:51 pm Ryan Masuga said:

I’m sort of falling off the Transmit truck - it has really been conking out on me too much lately. Too many connections refused by the server, etc.

So, would anyone know of a way to get this Transmit trick to work with YummyFTP, which (and I’m still using the demo) seems much faster than Transmit?

Coda is cute and all, but I’m really married to Textmate as far as a text-editor goes.

FuseFS sounds interesting but might be beyond my feeble brain to comprehend or use.

I really agree with Erwin (#13) - BBEdit has this down and I wish it were just part of what Textmate could do naturally.

23. On May 25th, 2007 at 12:54 pm Stuart Colville said:

@Ryan: You should be able to do exactly the same trick you just need to locate where YummyFTP stores the temporary file downloads. Try looking in the application support folder.

24. On May 25th, 2007 at 12:55 pm Stuart Colville said:

@Rasmus: If this works for you great. I found SSHFS via MacFUSE a touch unreliable unfortunately. There are always other possibilities though, SMB or NFS mounts etc.

25. On July 19th, 2007 at 8:11 am Bunker said:

@Rasmus and Stuart:

The macFUSE and SSHFS trick works and is a lot easier with MacFusion but there is one problem the MacFuse core is not yet very reliable.

If somebody else has edited a file you have open, your file is fubar untill reboot and sometimes it causes kernel panic.

@Ryan: Did it work out to locate the temp folder for yummy? I’m also using yummy ftp at home.

26. On July 23rd, 2007 at 7:20 am elliottcable said:

One thing worth noting is this interesting… bug?

If the textmate project window is already active (has focus in cocoa) when the transmit transfer completes, it’ll open in a new window instead of said project. Not sure why.

A more relevant side effect of this is that if you don’t wait for each transfer to complete before starting another one, the textmate window will have focus as soon as the first completes (when a transfer completes it switches focus to textmate immediately), so the second one will open in another textmate window; this means the project has lost focus again, so the third file goes back to the project; fourth to it’s own window, 5th to project window, and so on. It’s annoying and odd behavior.

tl;dr - you can’t select a bunch and open them all at once, you have to open files one at a time

27. On October 23rd, 2007 at 7:19 pm Jon Gales said:

You are my hero. This was my one gripe with working on external files. Thanks!

28. On December 17th, 2007 at 2:24 am Roger Gordon said:

Thanks a lot for this. I recently switched from Cyberduck and Smultron to Transmit and Textmate. I was about to drop Textmate due to this problem, but your article saved the day! Thanks so much.

29. On January 3rd, 2008 at 11:50 pm Michael Tyznik said:

I’ve been using this method for a while now, but it’s stopped working recently. Looking into it, it seems like it might be an update of Transmit that broke it. The folders Transmit uses to store temporary items are hidden now (starting with .). Were they hidden before, or is this new? Do you know of a workaround?

30. On January 4th, 2008 at 12:08 am Stuart Colville said:

@Michael: I think they were. I’ve tried this from scratch and it works the only thing that failed was opening a file beginning with a period. The solution was to simply put * as the ‘file pattern’ instead of blanking it.

31. On February 28th, 2008 at 1:43 pm Joon said:

Is there a solution to have tabs in textmate with Coda?

32. On March 1st, 2008 at 11:33 am Stuart Colville said:

@joon: Sure you’ll probably be able to do the same thing; just look for the temporary files from coda and set it up in the same way.

33. On March 27th, 2008 at 7:17 pm Aaron said:

Thanks man! So handy…

34. On March 27th, 2008 at 9:55 pm Ron said:

Bloody brilliant!

35. On July 9th, 2008 at 7:29 pm nate beaty said:

This also works for Forklift, which stores tmp files in ~/Library/Caches/com.binarynights.ForkLift/

Thanks for the tip! Makes remote editing that much better. (It took me a while to get used to not having ftp built into my editor, but at this point I prefer it.)

36. On July 15th, 2008 at 5:29 pm Alexander Graf said:

That’s a live saver, seriously. Thanks a lot for that tip!
I got here through some other site but I’ll visit your blog more often now.

Thanks again!

37. On August 26th, 2008 at 12:10 pm Jacob Velin said:

Great article! Thank you for the thorough walk-through.
Cyberduck has been crashing a great deal on me lately while doing this type of remote editing via TextMate, so now I’m giving Transmit a go.







XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>



VMware Server: Convert Fixed Disk-images to Growable|(0)

Quick tip if you ever want to convert from a fixed disk image to an expandable one then the following command should do it:

sudo vmware-vdiskmanager -r source.vmdk -t 0 expandable.vmdk

Just replace “source” and “expandable” with your disk image file names. For more on what vmware-vdiskmanager can do for you type vmware-vdiskmanager -h

SVN Tip: Get List of Files Changed Between Revisions|(0)

svn diff -r REVNO:HEAD --summarize

Just replace REVNO with the start revision and HEAD with the end revision if you don’t want it to be the latest revision.

Photos on Flickr

© Copyright 2004-08 Stuart Colville, all rights reserved. May contain traces of Muffin. Powered by WordPress. Hosting by 1&1 This page was baked in 1.165s.