SFTP, FTP and S3 in the Sublime Text sidebar
Sublime Text is an enormously popular text editor for Mac, Windows, and Linux. Combining Sublime Text and ExpanDrive creates a powerful workflow—you can edit and manipulate files on SFTP/FTP or S3 in real-time directly within Sublime Text. You don’t need to download the file, edit it, and then re-upload it. We use Sublime in conjunction with ExpanDrive every day to develop the Ruby on Rails code that powers Strongspace.com as well as the ExpanDrive Store. It’s also one of the primary ways we dogfood ExpanDrive.
It’s pretty easy to get started. If you haven’t installed ExpanDrive, you can download the latest release here. It’s free to try out for a week and is available on Mac and Windows. These screenshots are from the Mac version, but it looks nearly the same on Windows.
We start by creating a new SSH (SFTP) connection within ExpanDrive, although you can connect to FTP, Amazon S3, or a whole variety of other supported cloud storage providers if you prefer.
ExpanDrive affords you a variety of configuration options for SFTP and FTP. We generally use public key authentication combined with Google Authenticator for multi-factor authentication. You can even set a remote path so that you can mount /etc and edit configuration files directly.
Once you have made the connection to the server, the contents are viewable in Finder, Explorer, or any other application. On the Mac, I like the Open in Sublime button to click a folder and then click Open in Sublime, which opens up the tree as a project. This is easier on Windows, where you can right-click and have the default shell extension offer “Open in Sublime.”
Now you can edit any file directly within Sublime, with the entire tree visible in the Sublime sidebar. While there are some other options available for accessing SFTP servers from within Sublime, I feel confident that ExpanDrive is the best. We have rock-solid background saves that let you hit command-s [or ctrl-s, if you’re on Windows] with abandon. You’ll experience no delay as the file is saved instantly and pushed out to your server in the background.