How to share/transfer an Atom installation (packages and settings) from one Mac to another?

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

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):

  1. Install Atom, and install package-sync through Edit-->Preferences-->Install as the screen shot shows: Install package-sync
  2. Open your command pallete and type: Create Package List and there will be a packages.cson file under your ~/.atom folder. Open Command palette Create Package List

  3. 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: .gitignore

    This makes sure the content downloaded by Atom from the Internet will not get synced to your dotfiles repo.

  4. Move the .atom folder to the dotfile repo:

    $ mv ~/.atom ~/dotfiles/tag-atom/atom

  5. Relink the folder:

    $ ln -s ~/dotfiles/tag-atom/atom ~/.atom

    Or if you have rcm installed:

    $ rcup

  6. 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: synced files


I recently built a package that syncs automatically your Atom settings and packages across multiple computers. A little bit like the bookmark synchronization mechanism in Google Chrome. It's called atom-package-sync. Maybe it could fit your needs.

enter image description here

Tags:

Atom Editor