Syncing Sublime Text 3 via Dropbox

How to synchronize your Sublime Text 3 settings between different machines via Dropbox

Many of us use different machines at work and at home. In my case, I have Sublime Text 3 installed on my iMac at work and also on my MacBook Pro.
(For Sublime Text 2 users, please read the note at the end of this tutorial.)

In my spare time I often try to improve my workflow and also the setup of my apps. I regularly test new Sublime Text add-ons and tweak my settings. Sometimes I find an add-on I like but forget about it before I'm back at work or I need to change certain settings and then I have do it for each machine individually. That is always a bummer and a waste of time.

So wouldn't it be cool to synchronize Sublime Text 3 on different machines?

To achieve this we'll use Dropbox and the magic of symbolic links. If you aren't already using Dropbox you can get an account with 2GB free storage right here at dropbox.com referral link.

Before we start, navigate to your Sublime Text folder from which we will use the setup data. Copy & rename the "Packages" and "Installed Packages" folder to " _Packages " and " _Installed Packages "(just in case we mess something up).

Now we need to get a grasp of the basic principles of symbolic links aka symlinks. We can create such symlinks by using the following scheme:

ln -s a b

This means we get access to data a and create a symlink called b. And that's about it!

To use the syncing from Dropbox for our purposes we need to set it up on both machines. It is important to first decide about the direction in which you want the folders to start the syncing process.
In my case I have an optimal Sublime Text setup on my MacBook Pro and want to synchronize that with my iMac.

This means I will first create a symlink in the Dropbox folder to get access to the data on my MacBook Pro.

ln -s ~/Library/Application\ Support/Sublime\ Text\ 3/Packages ~/Dropbox/Sublime\ Text\ 3/Packages
ln -s ~/Library/Application\ Support/Sublime\ Text\ 3/Installed\ Packages ~/Dropbox/Sublime\ Text\ 3/Installed\ Packages

Now I have my setup synced into the Dropbox.

From this point on I only have to tell OSX on my iMac get the data from Dropbox and use it for Sublime Text 3.

ln -s ~/Dropbox/Sublime\ Text\ 3/Packages ~/Library/Application\ Support/Sublime\ Text\ 3/Packages
ln -s ~/Dropbox/Sublime\ Text\ 3/Installed\ Packages ~/Library/Application\ Support/Sublime\ Text\ 3/Installed\ Packages

That's it! Now we have a perfectly synced set up on all of your machines.

Note: This tutorial also works for Sublime Text 2. The only extra step you need to do here is to do the actions above for the folder "Pristine Packages", too. Sublime Text 3 doesn't include this folder anymore.

Hopefully, this will be helpful for you. If you have any questions just tweet me @verpixelt.