Sublime Text 2 is a great text editor with a pretty flexible license agreement. The license is per user so if you buy a license you can use it on as many machines as you like. Although Sublime Text is quite powerful “out-of-the-box” it doesn’t take long until you start extending it with packages and configuring user settings. If you use Sublime Text on on multiple machines it can become a hassle to keep them all in sync. That is where cloud services like Dropbox comes to the rescue.

Andrew Hedges has written a blog post that describes in great detail how you can set up synchronization using Dropbox. Andrew’s post only describes how to set it up on OS X. If you are a Windows user, here is how you can do it. Although the procedure describes Dropbox, it should work just as well with Microsoft SkyDrive or Google Drive.

  1. In your Dropbox folder (usually at C:\Users\<user name>\Dropbox), add a folder called Sublime Text 2.
  2. In Sublime Text, select Preferences->Browse Packages to open the folder containing Sublime Texts packages. Go up one level to get to Sublime Text 2’s settings folder (usually C:\Users\<user name>\AppData\Roaming\Sublime Text 2).
  3. Quit Sublime Text 2.
  4. Copy the following three folders from ST2 settings to the Dropbox folder C:\Users\<user name>\Dropbox\Sublime Text 2: Installed Packages, Packages and Pristine Packages.
  5. Rename the original 3 folders in C:\Users\<user name>\AppData\Roaming\Sublime Text 2 to something like Installed Packages-20130327, Packages-20130327, and Pristine Packages-20130327. This step is optional, but it is always a good idea to keep a backup when making changes like this.
  6. Now open the Command Prompt and navigate to the ST2 settings folder using the command cd C:\Users\<user name>\AppData\Roaming\Sublime Text 2.
  7. Create symlinks for the package folders you just renamed to the ones you copied to Dropbox. The command to create a symlink is mklink /D <link name> <target>. In the Command Prompt execute the following three commands in sequence
    • mklink /D "C:\Users\<user name>\Dropbox\Sublime Text 2\Installed Packages" "Installed Packages"
    • mklink /D "C:\Users\<user name>\Dropbox\Sublime Text 2\Packages" "Packages"
    • mklink /D "C:\Users\<user name>\Dropbox\Sublime Text 2\Prisitine Packages" "Prisitine Packages"
  8. Open Sublime Text 2 and verify that all your packages are in place.

That’s it. If you repeat these steps for all machines you want to synchronize Sublime Text 2, then you get your packages and user settings synchronized at all times.

Freshening up Sublime Text - part three: Finding new packages

_This is the third post in a series where I am cleaning up and improving my Sublime Text environment. In the first part I [found a new t...… Continue reading