Set Up Visual Studio Code Again

Settings Sync

Settings Sync lets you share your Visual Studio Code configurations such as settings, keybindings, and installed extensions across your machines so yous are ever working with your favorite setup.

Turning on Settings Sync

You can turn on Settings Sync using the Plow On Settings Sync... entry in the Manage gear carte at the lesser of the Activeness Bar.

Turn on Sync command

You lot will be asked to sign in and what preferences you would like to sync; currently Settings, Keyboard Shortcuts, Extensions, User Snippets, and UI Land are supported.

Settings Sync configure dialog

Selecting the Sign in & Turn on button volition ask you to cull between signing in with your Microsoft or GitHub account.

Settings Sync configure dialog

After making this selection, the browser will open so that you tin can sign in to your Microsoft or GitHub business relationship. When a Microsoft account is chosen, y'all can employ either personal accounts, such as Outlook accounts, or Azure accounts, and you lot tin can likewise link a GitHub business relationship to a new or existing Microsoft business relationship.

Later signing in, Settings Sync will be turned on and continue to synchronize your preferences automatically in the groundwork.

Merge or Replace

If you already synced from a auto and turning on sync from another automobile, you will be shown with following Merge or Supersede dialog.

Settings Sync Merge or Replace dialog

  • Merge: Selecting this option will merge local settings with remote settings from the cloud.
  • Supplant Local: Selecting this pick will overwrite local settings with remote settings from the cloud.
  • Merge Manually...: Selecting this option will open Merges view where you tin merge preferences 1 past one.

Settings Sync Merges

Configuring synced data

Machine settings (with auto or machine-overridable scopes) are not synchronized by default, since their values are specific to a given car. You lot tin can as well add or remove settings you desire to this list from the Settings editor or using the setting settingsSync.ignoredSettings.

Settings Sync ignored settings

Keyboard Shortcuts are synchronized per platform by default. If your keyboard shortcuts are platform-doubter, you tin can synchronize them beyond platforms past disabling the setting settingsSync.keybindingsPerPlatform.

All congenital-in and installed extensions are synchronized along with their global enablement state. You can skip synchronizing an extension, either from the Extensions view ( ⇧⌘10 (Windows, Linux Ctrl+Shift+X)) or using the setting settingsSync.ignoredExtensions.

Settings Sync ignored settings

Following UI Land is synchronized currently:

  • Brandish Language
  • Activity Bar entries
  • Panel entries
  • Views layout and visibility
  • Recently used commands
  • Practise not bear witness again notifications

You lot can always change what is synced via the Settings Sync: Configure command or past opening the Manage gear carte, selecting Settings Sync is On, and then Settings Sync: Configure.

Conflicts

When synchronizing settings between multiple machines, there may occasionally be conflicts. Conflicts can happen when first setting upwards sync between machines or when settings change while a machine is offline. When conflicts occur, yous will exist presented with the post-obit options:

  • Accept Local: Selecting this pick will overwrite remote settings in the cloud with your local settings.
  • Accept Remote: Selecting this option will overwrite local settings with remote settings from the cloud.
  • Prove Conflicts: Selecting this will display a unequal editor similar to the Source Command diff editor, where you tin preview the local and remote settings and cull to either accept local or remote or manually resolve the changes in your local settings file and and so accept the local file.

Switching Accounts

If at any time yous desire to sync your data to a different account, yous can turn off and turn on Settings Sync once more with different account.

Syncing Stable versus Insiders

By default, the VS Code Stable and Insiders builds use dissimilar Settings Sync services, and therefore do non share settings. You can sync your Insiders with Stable by selecting the Stable sync service while turning on Settings Sync. This option is only available in VS Code Insiders.

Settings Sync Switch Service

Note: Since Insiders builds are newer than Stable builds, syncing them tin can sometimes pb to data incompatibility. In such cases, Settings sync volition be disabled automatically on stable to forbid information inconsistencies. One time newer version of Stable build is released, you can upgrade your stable client and turn on sync to keep syncing.

Restoring data

VS Code ever stores local and remote backups of your preferences while syncing and provides views for accessing these. In case something goes wrong, you can restore your information from these views.

Settings Sync backup views

You can open these views using Settings Sync: Show Synced Data command from the Control Palette. The Local Sync activeness view is hidden past default and you can enable information technology using Views submenu under Settings Sync view overflow actions.

Settings Sync enable local backup views

Local backups folder in the deejay can be accessed via the Settings Sync: Open Local Backups Folder command. The folder is organized by the blazon of preference and contains versions of your JSON files, named with a timestamp of when the fill-in occurred.

Note: Local backups are automatically deleted after 30 days. For remote backups the latest 20 versions of each individual resource (settings, extensions, etc.) is retained.

Synced Machines

VS Code keeps track of the machines synchronizing your preferences and provides a view to access them. Every machine is given a default proper name based on the blazon of VS Code (Insiders or Stable) and the platform it is on. You can always update the automobile name using the edit action available on the machine entry in the view. You lot can also disable sync on another machine using Turn off Settings Sync context menu action on the auto entry in the view.

Settings Sync machines views

You can open this view using Settings Sync: Show Synced Information command from the Command Palette.

If you are an extension author, you should make sure your extension behaves accordingly when users enable Setting Sync. For case, you probably don't want your extension to display the same dismissed notifications or welcome pages on multiple machines.

Sync user global state between machines

If your extension needs to preserve some user land across different machines then provide the state to Settings Sync using vscode.ExtensionContext.globalState.setKeysForSync. Sharing state such as UI dismissed or viewed flags across machines tin can provide a better user experience.

There is an case of using setKeysforSync in the Extension Capabilities topic.

Reporting problems

Settings Sync activeness can be monitored in the Log (Settings Sync) output view. If you feel a problem with Settings Sync, include this log when creating the issue. If your problem is related to hallmark, as well include the log from the Account output view.

How do I delete my data?

If yous desire to remove all your data from our servers, just plow off sync via Settings Sync is On bill of fare available under Manage gear menu and select the checkbox to clear all cloud information. If yous cull to re-enable sync, it volition be equally if you're signing in for the offset time.

Adjacent steps

  • User and Workspace settings - Acquire how to configure VS Code to your preferences through user and workspace settings.

Common questions

Is VS Code Settings Sync the same equally the Settings Sync extension?

No, the Settings Sync extension by Shan Khan uses a private Gist on GitHub to share your VS Code settings beyond different machines and is unrelated to the VS Code Settings Sync.

What types of accounts can I use for Settings Sync sign in?

VS Code Settings Sync supports signing in with either a Microsoft business relationship (for example Outlook or Azure accounts) or a GitHub account. Sign in with GitHub Enterprise accounts is non supported. Other authentication providers may be supported in the future and y'all can review the proposed Authentication Provider API in issue #88309.

Can I utilise a different backend or service for Settings Sync?

Settings Sync uses a dedicated service to store settings and coordinate updates. A service provider API may be exposed in the future to allow for custom Settings Sync backends.

Troubleshooting keychain bug

Settings Sync persists authentication information to the system keychain. Writing to the keychain can fail in some cases if the keychain is misconfigured.

macOS

If the keychain throws the error "The user proper name or passphrase you entered is not right.", open the Keychain Access app, right-click on the login keychain, and lock and unlock it again. This mistake was first reported in issue #76 as a problem after upgrading to macOS High Sierra, only information technology has also been reported on more recent macOS versions.

Linux

If the keychain throws the error "No such interface "org.freedesktop.Secret.Collection" on object at path /org/freedesktop/secrets/collection/login", endeavour following the steps described in effect #92972 to create a new keyring.

If the fault is "Writing login information to the keychain failed with error 'Unknown or unsupported send "disabled" for address "disabled:"'", check that dbus-launch has been started by following the instructions in effect #120392.

If the fault is "Writing login information to the keychain failed with error 'Cannot create an detail in a locked drove'.", y'all need to:

  1. Add together the following lines to your ~/.xinitrc:

                                  # run into https://unix.stackexchange.com/a/295652/332452                source                                  /etc/X11/xinit/xinitrc.d/50-systemd-user.sh                # see https://wiki.archlinux.org/championship/GNOME/Keyring#xinitrc                eval                                                $(/usr/bin/gnome-keyring-daemon --start)                export                                  SSH_AUTH_SOCK                # see https://github.com/NixOS/nixpkgs/issues/14966#issuecomment-520083836                mkdir -p                                "                $HOME                "                /.local/share/keyrings                          
  2. Login again.

  3. Have the post-obit programs installed (installation assumes arch/pacman, should exist like to other distros):

                                  sudo pacman -S gnome-keyring libsecret libgnome-keyring                          
  4. Launch seahorse, unlock the default password keyring or create a new one, and continue it unlocked.

  5. Restart the login process.

Yeah. Please refer to the Syncing Stable versus Insiders section for more information.

Please notation that this tin can sometimes lead to information incompatibility because Insiders builds are newer than Stable builds. In such cases, Settings Sync will exist disabled automatically on Stable to forbid data inconsistencies. In one case a newer version of the Stable build is released, y'all tin upgrade your client and turn on Settings Sync to continue syncing.

gilberteventer1978.blogspot.com

Source: https://code.visualstudio.com/docs/editor/settings-sync

0 Response to "Set Up Visual Studio Code Again"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel