I bounce between Windows and Mac on a daily basis. Thankfully, Sublime Text 3 is available on both platforms. Here’s where I get into trouble… I’ll run across a plugin/package that I install for ST3 on my Windows machine and forget to install it on my Mac next time I’m using it… and vice versa. It’s been terribly momentum-halting to reach for a command or tool that’s not present on one machine because I’d forgotten to also install it there. There has to be a way to sync my ST3 settings using Dropbox, Google Drive, or something similar, right?
Huzzah! There’s a way! | Update: And now an even better way! Sublimall!
You should be able to adapt the instructions below for a sync tool of your choice. I’ll be using Dropbox because… well, I like to Keep Calm and Dropbox.
Step 1: Choose which ST3 environment you’ll copy
At this point, you’re Goldilocks staring at a couple different beds. You’ll want to start w/ the machine that has ST3 in the ‘best’ state to copy settings from. Make sure it has all your desired plugins installed and your User Preferences set just right.
Step 2: Prep the First Machine
IMPORTANT! – First, quit ST3.
Open Terminal and run the following commands.
cd ~/Library/Application Support/Sublime Text 3/Packages/ mkdir ~/Dropbox/ST3 mv User ~/Dropbox/ST3/ ln -s ~/Dropbox/ST3/User
Open PowerShell as Admin and run the following commands.
cd "$env:appdataSublime Text 3Packages" mkdir $env:userprofileDropboxST3 mv User $env:userprofileDropboxST3 cmd /c mklink /D User $env:userprofileDropboxST3User
Note: This has only been tested on Windows 7 with Dropbox in the default install location.
Step 3: Config the Second Machine
IMPORTANT! Make sure ST3 isn’t running.This is going to delete your current User directory – but don’t panic, you just moved it to Dropbox in the previous step.
cd ~/Library/Application Support/Sublime Text 3/Packages/ rm -r User ln -s ~/Dropbox/ST3/User
cd "$env:appdataSublime Text 3Packages" rmdir -recurse User cmd /c mklink /D User $env:userprofileDropboxST3User
Step 4: Test!
- Open Sublime Text 3 again from your Master computer. It should open without error.
- Make a change to your User Prefs – maybe font-size or something easy.
- Save and close ST3.
- Open ST3 on your other machine… your new setting should be in place!
- Take a victory lap around your office!
Or skip all the above headache and use Sublimall.
Sublimall is a server and a Sublime Text 3 plugin. It can create a compressed & encrypted archive of your ST3 config and send it to the server. As of now, the server is operated by the developer. He’s mentioned that he’s planning to open source the server code soon so you’d be able to host your own.
Once installed, you can open the command pallette and choose
Sublimall Upload to backup your config and send it to the server.
Sublimall Retrieve will then pull a config down on any other computer you use.