Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to save/restore Sublime Text 2 configs/plugins to migrate to another computer?

I need to migrate from one Mac to another, and want Sublime Text 2 on a new computer to have all the same configuration/plugins I have installed on the old one.

Is there some folder(s) I could just copy and restore on another one to replicate everything?

like image 280
earlyadopter Avatar asked Jul 06 '12 16:07

earlyadopter


People also ask

Where are Sublime Text files stored?

Depending on your operating system, this directory is located in: Windows: %APPDATA%\Sublime Text. Mac: ~/Library/Application Support/Sublime Text.

How do I revert Sublime Text?

Close Sublime Text. Delete the sublime Text 3 folder. Rename the original Sublime Text 3 folder (in my case, it'd be the folder Sublime Text 3-actual ) to Sublime Text 3. Restart Sublime Text.

How do I get plugins for sublime?

Download and install Package Control Go to SublimeText – Preferences – Package Control (MAC) or Preferences – Package Control (PC) Choose “Install Package” from the list of options. Find the name of the package you wish to install and select it.


2 Answers

I just set up a good solution for this, it requires dropbox. I am currently using this to sync plugins and settings across ~5 different sublime installs on windows, linux, osx, and a few vm's.

  • Step 1: use PackageControl to manage all your plugins, its awesome.

  • Step 2: Add a "Sublime" directory to your root drop-box directory (I replicated the full directory structure for the hell of it, {DropBox}/Sublime/Packages/User). Make sure sublime is closed, and move the contents of {SublimeRoot}/Packages/User in to the dropbox directory you just made. Delete {SublimeRoot}/Packages/User, and replace it with a symlink that points to {DropBox}/Sublime/Packages/User.

Use this same process on every computer where you use sublime, it accomplishes 2 things.

  • 1) The contents of your User/ directory are synced, so all your custom settings are the same across machines.

  • 2) Every time PackageControl starts up, it checks the Package Control.sublime-settings in your User/ directory. If if finds a plugin that should be installed according to the settings, but isn't actually installed, it automatically installs it, no questions asked.

Setting up another computer with this solution simply requires sublime and package control to be installed, then just delete the {SublimeRoot}/Packages/User/ directory and point it to the copy in dropbox with a symbolic link. Next time you fire up sublime, package control will automatically install all your plugins.

Creating the symbolic links: execute from the {Sublime}/Packages directory

  • Windows: mklink /D .\User C:\Users\[username]\Dropbox\Sublime\Packages\User
  • Linux/OSX: ln -s {DropboxRoot}/Sublime/Packages/User ./User
like image 153
jdc0589 Avatar answered Sep 28 '22 15:09

jdc0589


Add directory ~/Library/Application Support/Sublime Text 2/Packages to git repository. For example bitbucket. So you can commit after any changes with plugins and settings. If something failes with sublime text2 you can easy rollback.

like image 35
Maxim Yefremov Avatar answered Sep 28 '22 14:09

Maxim Yefremov