52

I would like to sync Sublime Text 3's Settings across multiple machines using Dropbox.

How should I set this up?

MattDMo
  • 100,794
  • 21
  • 241
  • 231
Undistraction
  • 42,754
  • 56
  • 195
  • 331

3 Answers3

80

I've been syncing my Sublime settings for a while between multiple locations, all running OS X. I've had some minor problems. Finally, I decided to look into it which led me to what I would consider the authoritative description of how to sync Sublime setting between multiple machines using Dropbox:

Sublime Package Control > Docs > Syncing
https://sublime.wbond.net/docs/syncing

Here is the basic summary:

To properly sync your installed packages across different machines, you actually do not want to sync the whole Packages/ and Installed Packages/ folders. The reason for this is that some packages have different versions for different operating systems. By syncing the actual package contents across operating systems, you will possibly run into broken packages.

The proper solution is to:

  1. Install Package Control on all machines
  2. Then to sync only the Packages/User/ folder.

This folder contains the Package Control.sublime-settings file, which includes a list of all installed packages. If this file is copied to another machine, the next time Sublime Text is started, Package Control will install the correct version of any missing packages.

To sync the folder, you generally move Packages/User/ into your Dropbox and create a symlink to it from Sublime Text 3/Packages/. Detailed instructions for various operating systems are provided via the link above.

Community
  • 1
  • 1
Tomek
  • 1,170
  • 11
  • 10
  • 3
    I run the portable version of Sublime Text 3 directly from Dropbox. Works like a charm if you use the same OS on all your machines. – NiloVelez Feb 05 '14 at 09:39
  • 1
    @NiloVelez Good point. Will try it too instead of symlinking all that stuff. – MaRmAR Mar 18 '14 at 13:11
  • You might have some issues if you use it simultaneously on two computers, but it shouldn't be a problem if you work alone. – NiloVelez Mar 19 '14 at 13:50
  • Worked well for me, but I have one issue I'm unsure how to solve. I need to use a proxy for Package Control at work, but not at home. Since the Package Control settings are also synced, I have to manually add/remove the proxy setting depending on where I am. Anyone got a better solution? – anr78 Jan 30 '15 at 20:55
  • The question in the previous comment is beginning to stray off topic here. The new question is "How to set up proxy for Package Control" at different locations using the same settings file". Or something like that. However, in the spirit of helping out anyway, since the settings file is a Python script perhaps one could modify it to use Environment Variables to set the proxy varaible. – Tomek Feb 20 '15 at 01:33
  • 1
    The only problem with the dropbox method described in the link is that the **User** directory does not contain per package `*.sublime-settings`, thus these configurations being lost. Any way around this? – Ricky Boyce Feb 23 '16 at 02:46
  • @RickyB Couldn't find any other way than symlinking each package `*.sublime-settings` file separately. – sepehr Jan 03 '17 at 15:32
  • This basically proves my assumption. Thx. I don't need extra package settings, but only basic settings, which is the point. – WesternGun Jun 27 '17 at 16:47
17

IMPORTANT: My answer is not correct. Tomek's answer is better

Before you start, close Sublime Text 3

  1. Create a folder in Dropbox called Sublime Text 3

  2. Move the following two folders to this folder.

    ~/Library/Application\ Support/Sublime\ Text\ 3/Packages
    
    ~/Library/Application\ Support/Sublime\ Text\ 3/Installed\ Packages
    
  3. Create symlinks from their original location to their new locations in Dropbox:

    $ ln -s ~/Dropbox/App\ Settings/Sublime\ Text\ 3/Installed Packages ~/Library/Application\ Support/Sublime\ Text\ 3/Installed\ Packages
    
    $ ln -s ~/Dropbox/App\ Settings/Sublime\ Text\ 3/Packages ~/Library/Application\ Support/Sublime\ Text\ 3/Packages
    
  4. Open Sublime Text 3

Undistraction
  • 42,754
  • 56
  • 195
  • 331
  • 1
    The other answer is the correct one, if you are only using Package control packages, `To properly sync your installed packages across different machines, you actually do not want to sync the whole Packages/ and Installed Packages/ folders.`, `The proper solution is to sync only the Packages/User/ folder`. From https://sublime.wbond.net/docs/syncing – Karthik T Jan 03 '14 at 03:24
  • @KarthikT I've given Tomek the win. – Undistraction Jan 07 '14 at 12:27
  • Thanks, yours is the method I use, with git instead of dropbox, and a looot of files keep changing.. Your answer is more generic though, and works for non Package control packages – Karthik T Jan 08 '14 at 05:35
8

For Linux users using Dropbox


The following is an excerpt taken directly from Sublime Text Package Control DOCS Syncing:

The proper solution is to install Package Control on all machines and then to sync only the Packages/User/ folder. This folder contains the Package Control.sublime-settings file, which includes a list of all installed packages. If this file is copied to another machine, the next time Sublime Text is started, Package Control will install the correct version of any missing packages.

This also sync your preferences.sublime-settings and your macros! Exactly what I wanted for Christmas.


Instructions:

If your Dropbox folder is not in the default location, you'll need to change ~/Dropbox to your location.

1) Close Sublime Text ( Very important! )
2) Open Terminal

Obs: for Sublime Text 2 just change 3 by 2

First Machine

On your first machine, use the following instructions.

cd ~/.config/sublime-text-3/Packages/
mkdir ~/Dropbox/Sublime
mv User ~/Dropbox/Sublime/
ln -s ~/Dropbox/Sublime/User

Other Machine(s)

On your other machine(s), use the following instructions. These instructions will remove your User/ folder and all contents!

cd ~/.config/sublime-text-3/Packages/
rm -r User
ln -s ~/Dropbox/Sublime/User

ref: https://packagecontrol.io/docs/syncing#dropbox-linux

Igor Parra
  • 10,214
  • 10
  • 69
  • 101
  • 1
    Just be careful that these instructions are for Linux only, they're slightly different for other OSes. The page linked to by Igor and Tomek has more info: https://sublime.wbond.net/docs/syncing – Harry Jun 29 '15 at 11:22