Blog

Website maintenance with Textmate and FTP/SSH Bundle

I tend to work on local copies of my websites, which have either corresponding vhost entries in my local Apache configuration, or are simply symlinked to my ~/Sites folder. That way, I can test to make sure everything’s 100% before I make changes live.

This has typically been a bit of a messy workflow – I make changes, and then when happy, either open up a terminal and rsync the whole lot over, or open up Flow/Transmit and manually copy the changed files over. The whole thing makes me disinclined to make changes at all!

That is, until on a whim, I did a google search for a Textmate FTP bundle, and found Bernhard Fürst’s FTP/SSH Bundle for Textmate. This little gem lets you configure FTP settings for a project, then hit Option-S to save to the remote server, or Option-R to reload from the remote server. This way, when I’m happy with the changes, I just whack Option-S to send them to the server straight from Textmate.

That makes me happy.

One little caveat – the bundle does an odd thing with the project directory, opting to use the parent folder of the Textmate project file, something which won’t work for ad hoc projects, when one just drags a folder into Textmate (one of my favourite features). A quick fix:

  1. Find Library/Application Support/TextMate/Bundles/FTP-SSH and open its contents
  2. Open up Support/lib/helper_functions.php
  3. Change the $PROJECT_DIR definition on line 15 to:

    $PROJECT_DIR = $_ENV['TM_PROJECT_DIRECTORY'];

Voila!

, , . Bookmark the permalink. Both comments and trackbacks are currently closed.

2 Comments

  1. Posted July 1, 2009 at 3:00 pm | Permalink

    Very cool. I’ll have to give this a shot. So much can be done with textmate.

  2. Posted September 26, 2011 at 6:49 pm | Permalink

    Thanks for the link, I was needing something like this!