Sublime Forum

Importing settings from one computer to another

#1

I have two macs, (imac & macbook pro). I’d love to be able to just import all of my sublime text settings (keybinding, configuration, installed packages, etc) primarily because I’m being lazy. :smiley: . Is there a way to simply import my settings from one computer to the other?

Thanks for any help.

0 Likes

Exporting Sublime Text 2 settings
#2

One possibility would be to put the settings files in a git repository. I use a general dotfiles repository, and symlink to the appropriate locations. But you could also make your Sublime Text user settings directory a git repository:

cd ~/Library/Application\ Support/Sublime\ Text\ 2/Packages/User/
git init
git add <files to share>
git commit -m "Initial configuration files."

Now you need some place to synchronize the git repository your settings to, e.g. you could make an account at Github. With a free Github account, you can make public git repositories (if you mind sharing your settings, you could make a private account).

Now suppose that your username is ‘jive’ and the repository that you made ‘sublimesettings’, you could ‘push’ the local repository with settings to GitHub

cd ~/Library/Application\ Support/Sublime\ Text\ 2/Packages/User/
git remote add origin git@github.com:jive/sublimesettings.git
git push origin master

Now, on the second machine you can clone the repository:

cd ~/Library/Application\ Support/Sublime\ Text\ 2/Packages
mv User User.old
git clone git@github.com:jive/sublimesettings.git User

From then on, you can update settings from one of the machines:

# Edit settings...

cd ~/Library/Application\ Support/Sublime\ Text\ 2/Packages/User
# Select which changes you want to commit. If you want to add a new file: git add <filename>
git add -p
# Commit
git commit -m "Some descriptive message of the changes."
git push

Now you can simply pull the changes on the other machine:

cd ~/Library/Application\ Support/Sublime\ Text\ 2/Packages/User
git pull

And the settings are in sync. As a bonus, you have a full history of your settings and a backup at Github.

(Ps. Sans typos, of course :smile:)

0 Likes

#3

Nice suggesting with the git repo!

0 Likes

#4

Anyone figured out how to migrate the .sublime-project and .sublime-workspace files?

0 Likes