Home Download Buy Blog Forum Support

importing settings from one computer to another

importing settings from one computer to another

Postby jive on Fri Sep 30, 2011 3:00 pm

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. :D . Is there a way to simply import my settings from one computer to the other?

Thanks for any help.
jive
 
Posts: 10
Joined: Fri Sep 09, 2011 4:05 pm

Re: importing settings from one computer to another

Postby danieldk on Fri Sep 30, 2011 3:15 pm

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:

Code: Select all
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

Code: Select all
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:

Code: Select all
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:

Code: Select all
# 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:

Code: Select all
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 :))
danieldk
 
Posts: 1
Joined: Fri Sep 30, 2011 3:03 pm

Re: importing settings from one computer to another

Postby philosopherdog on Sun Apr 14, 2013 3:10 pm

Nice suggesting with the git repo!
philosopherdog
 
Posts: 35
Joined: Sat Nov 26, 2011 3:08 pm

Re: importing settings from one computer to another

Postby thanpolas on Mon Jul 15, 2013 12:03 pm

Anyone figured out how to migrate the
Code: Select all
.sublime-project
and
Code: Select all
.sublime-workspace
files?
thanpolas
 
Posts: 3
Joined: Fri Nov 16, 2012 7:12 pm


Return to Technical Support

Who is online

Users browsing this forum: Google [Bot], Yahoo [Bot] and 28 guests