22

I have two computers, a desktop and a laptop. Now I have set up my ENV to sync with the help of a dropbox link.

Is there a way to sync my Sublime Text 3 settings between these two computers including all my plugins, preference files, etc... and, if so, how can I set things up to sync properly?

andreas
  • 16,357
  • 12
  • 72
  • 76
R.J. Robinson
  • 2,180
  • 3
  • 21
  • 33

4 Answers4

22

Despite DropBox, you can simply use Git to sync Sublime Text settings and Package Control Packages:

  1. Create a repository (e.g. on GitHub)
  2. Create a gitignore file with the following content:

    # Ignore everything...
    *
    # ... except preferences and package list
    !.gitignore
    !Preferences.sublime-settings
    !Package Control.sublime-settings
    
  3. Set up the created repository in the user directory (Windows 10: ~/AppData/Roaming/Sublime\ Text\ 3/Packages/User, Ubuntu: ~/.config/sublime-text-3/Packages/User) of the first computer with the following Git commands:

    $ git init
    $ git remote add origin <repository url>
    $ git fetch
    $ git commit -am "added: settings and packages"
    $ git push
    
  4. Set up the repository on all other computers (the last line overwrites the current settings with those from the repository):

    $ git init
    $ git remote add origin <repository url>
    $ git fetch
    $ git reset --hard origin/master
    

Now you just have to pull/push changes from the repository to have your settings and packages synchronized. In addition you can sync the settings with the Git Package for Sublime Text. Here you don’t have to switch to a Git Shell to pull or push the changes but you can do it right in Sublime Text.

See this article on Medium for further information.

andreas
  • 16,357
  • 12
  • 72
  • 76
21

I am assuming you are using Package Control for managing your plugins.

What to Sync

Both a list of your packages as well as all of your settings files are all contained within your Packages/User/ folder and that is what you want to keep synced. Assuming that folder is synced, then all you have to do is make sure Package Control is installed and it will automatically install the correct packages based on the packages list you synced.

How to Sync

See this page on the Package Control website for instructions on syncing your settings.

The techniques listed there essentially are either using Git directly in your Packages/User/ folder or are using Dropbox (although the same concept would apply to any cloud service) in combination with symbolic links (since your Dropbox directory and your Sublime Text install are probably not in the same place on your hard drive).

Rob Wise
  • 4,930
  • 3
  • 26
  • 31
  • This is very helpful - I would think the instructions for Dropbox would also work for similar tools like Google Drive and Box, right? – flow2k Jun 02 '17 at 19:29
  • 2
    FYI this solution is very manageable even for those with very limited knowledge of the command line. e.g. I use ST3 almost only for typesetting HTML and .tex and have only basic knowledge of programming concepts, but was able to implement (I mention this only because it took me ~5mins of staring at it to give it a shot, as I'm not very comfortable with Git & don't know much about the "under the hood" functioning). – Rax Adaam Nov 25 '17 at 19:54
5

Use the SyncSettings package. Takes like 30 seconds to set up

serg06
  • 2,027
  • 1
  • 18
  • 26
0

Can be done with 2 steps using Google Drive:

  1. Download Drive for mac/windows (https://www.google.com/drive/download/)

  2. sync this folder: C:\Users\{user_name}\AppData\Roaming\Sublime Text 3\Packages\User (right click and sync)

This includes all sublime settings, package settings, keybindings and list of all installed packages.

Just replace this folder on new machine and you're good to go.

Read more here: https://packagecontrol.io/docs/syncing

GorvGoyl
  • 42,508
  • 29
  • 229
  • 225