Remote editing with Sublime Text 2

I’ve been quite taken with Sublime Text 2 recently, and I’ve been trying to find a way to introduce it into my daily work flow. While it’s perfect for editing files locally, it doesn’t have any built-in remote editing facilities such as Coda. As I work remotely, this is a pain.

I do have ExpanDrive, and depending on the speed of your server, this can work fairly well. However, you do miss out on some of the extra features of Sublime Text, such as ‘find in files’ and web development plugins.

I’ve experimented a bit with a mix of rsync and directory watches, but the best solution has been the simplest, and also a quick introduction into the world of Python.

Using the Sublime Text API, I wrote a plugin to monitor any changes to a file and simply scp (secure copy) it across to my remote server. All password details are already setup by dint of it going over SSH.