How to share/transfer an Atom installation (packages and settings) from one Mac to another?
Solution 1:
There are several ways to synchronize your settings and packages between Atom installations:
-
Git: Create a public or private Git repo and store the contents of your local
~/.atom
folder in there. Ignore the following files/directories in a.gitignore
file:storage compile-cache dev .npm .node-gyp
Use a package like sync-settings. This will store your configuration in a GitHub Gist.
Dropbox (or similar): Move your
~/.atom
folder to your Dropbox folder and then symlink it from there to its original location. This has the downside of syncing everything in~/.atom
, even the things you could ignore.Use stars to select your favorite packages. On the Atom web site, create an account and mark your favorite packages with stars. Then use
apm stars --install
to install all starred packages on any machine. Downside: This only works for packages, not for settings.
More details:
- https://discuss.atom.io/t/syncing-settings-packages-between-machines/1385
Solution 2:
As a user who uses a dotfile management system such as RCM, I prefer independent config files.
For now, Atom doesn't officially provide a packages.cson
file to manage plugins, but as the post Syncing settings & packages between machines mentioned, there is a plugin called package-sync that will generate a packages.cson
file for us.
So with the help of package-sync, now I can just sync those mininal config files to have my Atom settings and packages consistent across multiple machines.
This is how to do it (Use ubuntu as an example):
- Install Atom, and install package-sync through Edit-->Preferences-->Install as the screen shot shows:
Open your command pallete and type:
Create Package List
and there will be apackages.cson
file under your~/.atom
folder.-
Edit the gitignore file:
$ gedit ~/.atom/.gitignore
Make sure the content is:
blob-store compile-cache dev storage .node-gyp .npm .apm packages/ atom-shell/
This is a screenshot of the
.gitignore
file:This makes sure the content downloaded by Atom from the Internet will not get synced to your dotfiles repo.
-
Move the
.atom
folder to the dotfile repo:$ mv ~/.atom ~/dotfiles/tag-atom/atom
-
Relink the folder:
$ ln -s ~/dotfiles/tag-atom/atom ~/.atom
Or if you have rcm installed:
$ rcup
Now go to another machine, and install Atom and package sync. Update your dotfiles repo, and then Open your Atom command pallete and type:
sync
Now your Atom settings will get synced and integrated with the RCM dotilfe management system.
This is the files in my ~/.atom
folder that get synced: