• Stars
    star
    1,139
  • Rank 40,911 (Top 0.9 %)
  • Language
    JavaScript
  • License
    MIT License
  • Created over 10 years ago
  • Updated about 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Synchronize all your settings and packages across atom instances

Sync Settings for Atom

CI

Synchronize settings, keymaps, user styles, init script, snippets and installed packages across Atom instances.

Features

  • Sync Atom's and package settings
  • Sync installed packages
  • Sync user keymaps
  • Sync user styles
  • Sync user init script
  • Sync snippets
  • Sync user defined text files

Installation

$ apm install sync-settings or using the Install button from Atom.io.

Backup locations

By default your backup will be stored in a gist, but you may also install other location packages.

Some other locations:

Gist Setup

  1. Open Sync Settings configuration in Atom Settings.
  2. Create a new personal access token which has the gist scope and be sure to activate permissions: Gist -> create gists.
  3. Copy the access token to Sync Settings configuration or set it as an environmental variable GITHUB_TOKEN.
  4. Create a new gist:
  • The description can be left empty. It will be set when invoking the backup command the first time.
  • Use packages.json as the filename.
  • Put some arbitrary non-empty content into the file. It will be overwritten by the first invocation of the backup command
  • Save the gist.
  1. Copy the gist id (last part of url after the username) to Sync Settings configuration or set it as an environmental variable GIST_ID.

Disclaimer: GitHub Gists are by default public. If you don't want other people to easily find your gist (i.e. if you use certain packages, storing auth-tokens, a malicious party could abuse them), you should make sure to create a secret gist.

Alternative Sync Settings configuration using Atom's config.cson

  1. Click on Menu "Open Your Config" to edit Atom's config.cson
  2. Use these keys:
  "sync-settings":
    gistId: "b3025...88c41c"
    personalAccessToken: "6a10cc207b....7a67e871"

Cloning a backup to a fresh Atom install

  1. Install the package from the command line: apm install sync-settings
  2. Launch Atom passing in GITHUB_TOKEN and GIST_ID. For example:
GITHUB_TOKEN=6a10cc207b....7a67e871 GIST_ID=b3025...88c41c atom
  1. You will still need to make sure you add your gist id and github token to the Sync Settings configuration in Atom Settings OR set them as environment variables in your shell configuration.

Usage

Open the Atom Command Palette where you can search for the following list of commands.

Backup or restore all settings from the Packages menu or use one of the following commands:

  • sync-settings:backup
  • sync-settings:restore

View your online backup using the following command:

  • sync-settings:view-backup

Check the latest backup is applied:

  • sync-settings:check-backup

You can also fork existing settings from a different GitHub user using the following command:

  • sync-settings:fork
  • In the following input field enter the Gist ID to fork

Create a new backup:

  • sync-settings:create-backup

Delete the current backup:

  • sync-settings:delete-backup

Running the tests

  1. Create a new personal access token which has the gist scope and will be used for testing purposes.
  2. Export it with export GITHUB_TOKEN=YOUR_TOKEN
  3. Run apm test

Contributing

If you're going to submit a pull request, please try to follow the official contribution guidelines of Atom.

  1. Fork it.
  2. Create your feature branch (git checkout -b my-new-feature).
  3. Ensure tests are passing. See running-the-tests.
  4. Commit your changes (git commit -am 'Add some feature').
  5. Push to the branch (git push origin my-new-feature).
  6. Create new Pull Request.

See all contributors.

Location Service

Packages can provide a location service using Atom's Service's API

Example:

Add the keywords sync-settings and location and add the providedServices property to your package.json file.

// package.json
  ...
  "main": "./main.js",
  ...
  "keywords": [
    ...
    "sync-settings",
    "location"
  ],
  ...
  "providedServices": {
    "sync-settings-location": {
      "versions": {
        "1.0.0": "provideLocationService"
      }
    }
  },
  ...

Then add the provideLocationService function to your main.js file (where your activate function is for Atom to activate your package)

// main.js
  ...
  activate () {
    ...
  },

  provideLocationService () {
    return require('./locationService.js')
  },
  ...

Return an object that provides the functions for your service.

// locationService.js

module.exports = {
  /**
   * Get URL for the backup
   * @return {string} Backup URL. Return null if no URL exists
   */
  async getUrl () {
    ...
  },

  /**
   * Create new backup location
   * @return {Object} Returns empty object on success. Falsey value on silent error
   */
  async create () {
    ...
  },

  /**
   * Get backup files and time
   * @return {Object} Returns object with `files` and `time` on success. Falsey value on silent error
   */
  async get () {
    ...
    return {
      files: {
        'filename.txt': {
          content: '...'
        }
      },
      time: new Date().toISOString(), // ISO string, (e.g. 2020-01-01T00:00:00.000Z)
    }
  },

  /**
   * Delete backup
   * @return {Object} Returns empty object on success. Falsey value on silent error
   */
  async delete () {
    ...
  },

  /**
   * Update backup and get time
   * @param  {Object} files Files to update
   * @return {Object} Returns object with `time` on success. Falsey value on silent error
   */
  async update (files) {
    ...
    return {
      time: new Date().toISOString(),
    }
  },

  /**
   * Fork backup
   * @return {Object} Returns empty object on success. Falsey value on silent error
   */
  async fork () {
    ...
  },
}

More Repositories

1

atom-script

🏃 Run ( scripts | selections | source ) in Atom
JavaScript
733
star
2

markdown-preview-plus

Markdown Preview + Community Features
TypeScript
370
star
3

ide-python

Python language support for Atom-IDE :atom: 🐍
JavaScript
237
star
4

tool-bar

Package providing customisable toolbar for Atom
CSS
160
star
5

autocomplete-paths

Autocomplete Paths for Atom
JavaScript
152
star
6

ui-theme-template

A starter template for creating Atom UI themes.
Less
97
star
7

language-scala

Language support for Scala in Atom.
52
star
8

atom-ide-base

Atom IDE packages for Atom
JavaScript
45
star
9

atom-languageclient

Provide integration support for adding Language Server Protocol servers to Atom.
TypeScript
44
star
10

atom-ide-datatip

Datatips for Atom IDE
TypeScript
32
star
11

atom-community.github.io

The Atom Community website.
TypeScript
27
star
12

atom-ide-definitions

Definitions for Atom IDE
JavaScript
25
star
13

zadeh

Blazing fast library for fuzzy filtering, matching, and other fuzzy things!
C++
24
star
14

terminal

Terminal integrated with atom-community/atom
JavaScript
19
star
15

atom-ide-signature-help

Provides signature help functionality for Atom IDE
TypeScript
17
star
16

atom-ide-javascript

JavaScript support for Atom IDE
JavaScript
17
star
17

atom-ide-outline

Outline UI compatible with IDE packages
TypeScript
13
star
18

atom-ide-vue

Vue language support for Atom IDE
JavaScript
13
star
19

atom-vscode

Use VsCode extentions inside Atom! [WIP]
TypeScript
12
star
20

atom-ide-markdown-service

A service component offering markdown rendering
TypeScript
11
star
21

atom-ide-debugger

Debugger for Atom IDE
JavaScript
9
star
22

papm

Performant Atom Package Manager
TypeScript
8
star
23

atom-ide-hyperclick

Pluggable text-clicking UI for Atom.
JavaScript
7
star
24

atom-ide-diagnostics

(Deprecated Use Linter/LinterUI instead) Diagnostics functionality for Atom-IDE.
JavaScript
7
star
25

prettier-config-atomic

The Prettier configuration used in atom-ide-community
TypeScript
6
star
26

etch-solid

fast DOM library - etch with solid backend
JavaScript
6
star
27

ide-sourcekit

Swift language support for Atom-IDE. C, Objective-C, and C++ will be supported when Apple adds them.
JavaScript
5
star
28

atom-ide-code-format

Code formatting for Atom-IDE
TypeScript
4
star
29

atom-ide-template

Template project for atom packages in TypeScript
JavaScript
4
star
30

eslint-config-atomic

A collection of awesome constructive Eslint rules used in Atom community
TypeScript
4
star
31

atom-ide-console

Aggregate and display output from various sources and provide an user interface for REPL-like functionality.
JavaScript
3
star
32

rollup-plugin-atomic

Rollup plugin used in atom-ide-community
TypeScript
2
star
33

terser-config-atomic

Terser config used in Atom community
TypeScript
1
star