Muffinresearch Labs by Stuart Colville

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

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

UPDATE: For opening tabs in transmit 4 see comment #49

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 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.

38. On November 10th, 2008 at 6:12 pm Ryan said:

Great tip – makes life a little easier!

39. On December 19th, 2008 at 5:57 pm Greg Hinch said:

I’ve been using this method for a while now and loving it, and then suddenly today it stopped working. The TemporaryItems folder in ~/Library/Caches seems to have disappeared! I created it again but Transmit no longer appears to be sending temp files here. Any ideas where they’re going now? Anyone else had this happen?

40. On December 22nd, 2008 at 2:24 am Greg Hinch said:

Nevermind figured it out, just had to repair disk permissions and Transmit recreated the directory. Also I should have read the previous comments, duh.

41. On February 4th, 2009 at 3:55 pm Altsi said:

Nice, I was wondering how this could be done!

42. On February 21st, 2009 at 1:56 pm Cesar Gonzalez said:

I’ve had this set up for years, and recently during an upgrade it stopped working. I erased my old “Transmit” project, redid the process, and it looks like it’s working again. Thanks!

43. On June 1st, 2009 at 6:39 pm resrc said:

Thanks! Works great, used Coda for remote editing, but this is much better……

44. On June 9th, 2009 at 3:18 pm Jake McGraw said:

effing saved, this is the best

45. On June 10th, 2009 at 3:05 pm roddesu said:

I can’t thank you (and Google for indexing this post!!) enough for figuring this out. I was sitting looking at a big project this morning and dreading all the command + ~ I was going to have to do. This saves me from buying Coda.

46. On September 28th, 2009 at 2:11 am lippe said:

Am I the only one having trouble with this on Snow Leopard? I’ve been using this tip since I got my laptop, but all of a sudden (after upgrading to SL), the files are no longer getting opened inside the Transmit-project.

I’ve tried making a new project following this tutorial with no success.

47. On September 30th, 2009 at 7:31 pm Stuart Colville said:

@lippe: I’d take a look but since I don’t have a mac at all any more it’s a little bit tricky.

48. On October 1st, 2009 at 10:52 am Ludovic Kuty said:

Great tip ! Thanks for sharing.

49. On April 27th, 2010 at 12:52 pm Sebastian said:

Thanks to Stuart for this back in 2006. Since the release of Transmit 4 today the paths have changed. I posted about this in my blog at http://blog.taenzer.me/textmate-open-files-from-ftp-in-tabs-with-tra

50. On April 29th, 2010 at 2:03 pm Tim Sawyer said:

Any idea how we do this in the just released Transmit 4? The cash seems to be hidden in a different place than in 3.

Tim

51. On April 30th, 2010 at 12:26 am Jonny Nott said:

Re: Transmit 4

The new path is:
~/Library/Caches/Cleanup At Startup/Transmit//

52. On September 17th, 2010 at 12:27 pm bonatoc said:

Sweeeeeeet !

Thx a lot.

53. On October 21st, 2010 at 8:27 pm floweht said:

was working fine with Transmit 4.1.2, I upgraded to 4.1.3 today and it stopped working. Has anyone experienced the same?

54. On October 21st, 2010 at 9:09 pm y8r said:

Just updated to Transmit 4.1.3 and tabs no longer work. Files are still stored in ~/Library/Caches/Cleanup At Startup/Transmit, but they don’t open in the project anymore.

55. On October 25th, 2010 at 12:51 pm Danny said:

This isn’t working for me after upgrading to Transmit 4.1.3. I can see the files in the Cleanup At Startup/Transmit folder, but when I open them in Transmit they’re always opening in a new window instead of the tabbed project.

56. On October 26th, 2010 at 12:10 pm Jochen said:

Like Danny said, not working after upgrade to 4.1.3.!

I couldn’t find any proper solution for me. :-(
(Tried Coda, BBEdit etc.)

Anybody an idea to fix the problem?
Thanks

57. On October 27th, 2010 at 1:19 pm Fox said:

yeah, mine too.
Guess it has something to do with “File Pattern” and “Folder Pattern” in Information Window… Any ideas?

58. On November 3rd, 2010 at 11:07 am Stuart Colville said:

Having switched to Ubuntu, I don’t have a mac to diagnose the problem. If anyone finds the solution please post details or a link in the comments and I will update this post.

59. On November 5th, 2010 at 12:31 am y8r said:

From research it seems that panic was fixing some issues for BBEdit/TextWrangler which caused some issues for other editors. It is suppose to be addressed in a newer version. Just updated to to 4.1.4 with no luck. My temporary solution is to download 4.1.2 from panic or visit their archive for other previous versions.

60. On November 17th, 2010 at 12:56 pm Jonny N said:

Panic support say: “Indeed, this is no longer working correctly. We may be able to fix this for a future version. In the meantime, we recommend using Transmit Disk as a workaround.”

61. On May 29th, 2011 at 12:19 pm Josh said:

Just use the Transmit Disk Feature. It shows your FTP volumes in the finder like any regular disk.







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>



GNU screen: open tab in current working directory|(1)

A nice trick for having screen open a new tab in the same directory as the one you’re currently in. To use it add it to your .screenrc

# Open new window in current dir.
bind c stuff "screen -X chdir \$PWD;screen^M"
bind ^c stuff "screen -X chdir \$PWD;screen^M"

Hat tip: mteckert on SuperUser.com

Ubuntu: add-apt-repository: command not found|(2)

When you’re using a minimal Ubuntu install if you find the ‘add-apt-repository’ command is missing (it’s useful for adding PPAs and other repositories), then simply run:

sudo apt-get install python-software-properties

Photos on Flickr

© Copyright 2004-12 Stuart Colville, all rights reserved. May contain traces of Muffin. Powered by WordPress. Hosting by Slicehost.com This page was baked in 0.665s.