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:
- Find Library/Application Support/TextMate/Bundles/FTP-SSH and open its contents
- Open up Support/lib/helper_functions.php
- Change the
$PROJECT_DIRdefinition on line 15 to:
$PROJECT_DIR = $_ENV['TM_PROJECT_DIRECTORY'];