An open API service indexing awesome lists of open source software.

https://github.com/nonoroazoro/vscode-syncing

:zap: VSCode Extension - Sync all of your VSCode settings across multiple devices.
https://github.com/nonoroazoro/vscode-syncing

gist sync vscode vscode-extension vscode-settings vscode-sync vscode-syncing

Last synced: 26 days ago
JSON representation

:zap: VSCode Extension - Sync all of your VSCode settings across multiple devices.

Awesome Lists containing this project

README

          

# Syncing

[![Installs](https://img.shields.io/visual-studio-marketplace/i/nonoroazoro.syncing)](https://marketplace.visualstudio.com/items?itemName=nonoroazoro.syncing)
[![Rating](https://img.shields.io/visual-studio-marketplace/r/nonoroazoro.syncing)](https://marketplace.visualstudio.com/items?itemName=nonoroazoro.syncing)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
[![License: 996ICU](https://img.shields.io/badge/License-Anti%20996-blue.svg)](https://github.com/996icu/996.ICU/blob/master/LICENSE)

[English](README.md) | [中文](README.zh-CN.md)

**Syncing** _([View Source Code](https://github.com/nonoroazoro/vscode-syncing))_ is a VSCode extension, designed to **synchronize all of your VSCode settings across multiple devices** with your [GitHub Gist](https://gist.github.com).

[Getting started](#getting-started) or [check out the examples](#examples).

> _Keep it simple & reliable!_

## Features

> ⚠️ **Breaking Change (v3.5.1)**:
>
> - `Syncing` now supports any VSCode variant, including `VSCodium`, `Cursor`, `Windsurf`, `Trae`, and more.
> - The `http_proxy` setting in `syncing.json` has been removed. Please use VSCode's `http.proxy` setting instead, see [`proxy settings`](#proxy-settings).

_Syncing_ will `keep the consistency of your VSCode settings between your devices`, it'll let you:

1. **Upload VSCode Settings**:

- Including your `User Settings`, `Keybindings`, `Extensions`, `Locales` and `Snippets`.
- The `keybindings` of `MacOS` and `non-MacOS` will be synchronized separately, in case you have multiple devices of different operating systems.
- Automatically create a new Gist to store your settings.
- Use an incremental algorithm to boost the synchronization.
- You can `exclude some VSCode User Settings and Extensions` from being uploaded, [check out the VSCode User Settings](#vscode-user-settings) for more details.

1. **Download VSCode Settings**:

- **Always overwrite** local settings.
- Automatically `install, update` and `remove` extensions.
- You can download settings from `a public Gist`, such as your friend's VSCode settings, [check out here](#getting-started) for more details.
- You can `exclude some VSCode User Settings and Extensions` from being downloaded, [check out the VSCode User Settings](#vscode-user-settings) for more details.

Besides, you can [set up a proxy](#proxy-settings) to accelerate the synchronization. And of course, you can turn on the [auto-sync](#auto-sync-settings) to simplify the synchronization :).

## Commands

You can type `"upload"`, `"download"` (or `"syncing"`) in `VSCode Command Palette` to access these commands:

1. _**`Syncing: Upload Settings`**_

> Upload settings to GitHub Gist.

1. _**`Syncing: Download Settings`**_

> Download settings from GitHub Gist.

1. _**`Syncing: Open Syncing Settings`**_

> Set your `GitHub Personal Access Token`, `Gist ID` or `HTTP Proxy` settings.

## Keybindings

The keybindings **are unassigned by default**, but you can easily turn them on by updating `VSCode Keyboard Shortcuts`:

![keyboard shortcuts](docs/gif/Keyboard-Shortcuts.gif)

## VSCode User Settings

You can find the following `Syncing Settings` in your `VSCode User Settings`.

1. _**`syncing.excludedExtensions`**_

You can configure [glob patterns](https://github.com/isaacs/minimatch) for excluding some `VSCode Extensions` from being synchronized.

> Note that the extensions not listed here will still be synchronized.

Take this for example:

```json
"syncing.excludedExtensions" : [
"somepublisher.*",
"nonoroazoro.syncing"
]
```

Note that the excluded `extension name` is actually the `extension id` (you can find it in the `VSCode Extensions View`), such as:

![exclude extensions](docs/png/Exclude-Extensions.png)

Now the extension `nonoroazoro.syncing` (i.e., `Syncing`) and all the extensions of the author `somepublisher` will no longer be synchronized.

1. _**`syncing.excludedSettings`**_

You can configure [glob patterns](https://github.com/isaacs/minimatch) for excluding some `VSCode User Settings` from being synchronized.

> Note that the settings not listed here will still be synchronized.

Take this for example:

```json
"syncing.excludedSettings" : [
"editor.*",
"workbench.colorTheme"
]
```

Now the `workbench.colorTheme` setting and all the settings of `editor` will no longer be synchronized.

1. _**`syncing.pokaYokeThreshold`**_

During the synchronization, `Syncing` will check the changes between your local and remote settings, and display a `confirm dialog` if the changes exceed this threshold.

The `default value` of this setting is `10`, and you can `disable this feature` by setting to a number `less than or equal to zero` (`<= 0`).

Take this for example:

```json
"syncing.pokaYokeThreshold" : 10
```

1. _**`syncing.separateKeybindings`**_

Synchronize the `keybindings` separately for different operating systems.

You may disable it since `VSCode` has introduced the [Platform Specific Keybindings](https://code.visualstudio.com/updates/v1_27#_platform-specific-keybindings) from `version 1.27`. But please make sure you've already `merged your keybindings` before disabling this setting.

This is `enabled by default` but you can turn it off in your `VSCode User Settings`.

## Proxy Settings

`Syncing` will use VSCode's `http.proxy` setting as its proxy settings, for example:

```json
"http.proxy": "http://127.0.0.1:1080"
```

If VSCode's `http.proxy` is not set, `Syncing` will fall back to the `http_proxy` and `https_proxy` environment variables.

## Auto-sync Settings

You can now let Syncing auto-sync your settings. Here are the steps:

1. Type `"Syncing: Open Syncing Settings"` (or just `"opensync"`) in `VSCode Command Palette` to open `Syncing`'s own settings file (i.e. `syncing.json`).

1. Enable the `"auto_sync"` setting, for example:

```json
"auto_sync": true
```

1. Reload or reopen VSCode to take effect.

## Getting Started

1. Get your own `GitHub Personal Access Token` (3 steps).

1. Login to your **[GitHub Personal Access Tokens page](https://github.com/settings/tokens)** and click **`Generate new token`**.

![generate new token](docs/png/Generate-New-Token.png)

1. Give your token a descriptive **`name`**, check **`gist`** and click **`Generate token`**.

![allow gist](docs/png/Allow-Gist.png)

1. **`Copy`** and **`backup`** your token.

![copy and backup token](docs/png/Copy-Token.png)

1. Sync your VSCode settings.

_`Syncing`_ will ask for necessary information `for the first time` and `save for later use`.

1. **Upload**

1. Type `upload` in `VSCode Command Palette`.

![upload settings](docs/png/Upload-Settings.png)

1. Enter your `GitHub Personal Access Token`.

1. Select or enter your `Gist ID`.

> You can `leave it blank` to create a new `Gist` automatically.

1. Done!

1. _After it's done, you can find the settings and the corresponding `Gist ID` in your [GitHub Gist](https://gist.github.com). Also, you can `Edit` and `make it public` to share your settings with others._

1. **Download**

1. Type `download` in `VSCode Command Palette`.

![download settings](docs/png/Download-Settings.png)

1. Enter your `GitHub Personal Access Token`.

> You can `leave it blank` if you want to download from a `public Gist`, such as your friend's VSCode settings.

1. Select or enter your `Gist ID` or a `public Gist ID`.

1. Done!

## Examples

1. Upload:

![upload example](docs/gif/Example-Upload.gif)

1. Download:

![download example](docs/gif/Example-Download.gif)

## Frequently Asked Questions

1. How do I make this work with [code-server](https://github.com/coder/code-server)?

Code-server follows the XDG spec to set config & data directories. When using their [Docker image](https://hub.docker.com/r/codercom/code-server), you can set `XDG_DATA_HOME="/home/coder/.config/"` to store everything files in the same directory. This enables vscode-syncing to easily pickup the right locations. Since it is also a recommended volume path, it ensures persistence of your changes.