Home Linux Code Editors How to Sync VSCode Settings Across Any Machines

How to Sync VSCode Settings Across Any Machines

Visual Studio Code aka VSCode is a very popular source-code editor that offers tons of extensions to satisfy everyone’s needs. VSCode is highly customizable and you can install plugins easily.

This article will primarily focus on how to save your VSCode settings and use the same settings in another machine without setting up everything from scratch.

[ You might also like: Micro – A Command Line Based Text Editor for Linux ]

What is the Need for VSCode Sync

I told you VSCode is highly customizable. No one is going to use freshly installed vscode till the end. According to the developer’s needs, he/she may customize it to any extent and install as many packages as they want.

What if there is another machine and you want to use the same settings? Do you think trying to replicate the settings manually from scratch would be an easy thing? Absolutely not. This is where Sync extension comes into play.

How to Syn Visual Studio Code Settings Across Machines

Sync setting extension uses GitHub gist and token to sync your settings across different machines. You need to have a Github account to follow the steps and set up perfect sync.

Install Settings Sync Extension in VSCode

Go to strong>VSCode, open extensions as shown below, and type “Settings Sync” and press Install.

Install Setting Sync Extension in VSCode
Install Setting Sync Extension in VSCode

There are two ways to configure sync settings. You can choose the “Login with Github” option which will use OAuth to authenticate with GitHub and will create gist automatically to upload your settings.

Setting Sync Extension Login
Setting Sync Extension Login

Once you grant permission you will see a message success in your browser.

Upload VSCode Settings to GitHub Account

To upload the settings to Github, open the command prompt by pressing “CTRL + SHIFT + P” and type “sync: update/upload settings”. You can also use “SHIFT+ ALT+ U”.

Upload VSCode Settings
Upload VSCode Settings

You can check the log to see if the sync is successful or not. To open the log, open the command pallet and type “setting sync: show log”.

VSCode Sync Settings Log
VSCode Sync Settings Log

Now go to https://gist.github.com/<username> and you will find a new gist is created automatically. From the below image you can see a total of five files have been uploaded to gist.

VSCode Sync Settings
VSCode Sync Settings

In the second method, you have to configure the settings manually by creating an access token and creating a gist. Personal access tokens are used for authentication purposes. Go to GitHub SettingsDeveloper SettingsPersonal access tokens → Generate New token.

Personal Access Token
Personal Access Token

Click gist and press “Generate Token”.

Generate Token
Generate Token

Token will be generated and you have to copy the token and keep it safe.

Copy Generate Token
Copy Generate Token

If you forgot or lost a token then there is an option to regenerate the token. The new token has to be updated in your sync settings.

Regenerate Token
Regenerate Token

Now create Gist and this git will be used to upload the settings.

Create Gist
Create Gist

You can get the gist id from the URL as shown below.

Gist ID
Gist ID

From the start page, click edit configuration for manual setup.

VSCode Sync Settings Configuration
VSCode Sync Settings Configuration

You have to enter both the gist ID and the Access token you created in the previous steps.

Manual Setup
Manual Setup

Now you are good to upload the settings. Open command pallet by pressing “CTRL + SHIFT + P” and type “sync: update/upload settings”.

Export VSCode Settings to Another Machine

Now to export the settings to another machine you have to follow the same second step. You have to install sync settings in your machine and choose “Edit configuration” to get the gist id and access token from GitHub.

Now open the command pallet and type “sync: Download settings” and press enter. Alternatively, you can also use SHIFT + ALT + D keybinding. This will download the settings from GitHub gist and will sync with your machine and boom you got all your settings, extension, keybindings, etc synced.

That’s it for this article. Vscode has now a native sync feature in the preview phase without any external packages. You should take a look at it.

Ravi Saive
I am an Experienced GNU/Linux expert and a full-stack software developer with over a decade in the field of Linux and Open Source technologies. Founder of TecMint.com, LinuxShellTips.com, and Fossmint.com. Over 150+ million people visited my websites.

Each tutorial at UbuntuMint is created by a team of experienced writers so that it meets our high-quality standards.

Was this article helpful? Please add a comment to show your appreciation and support.

2 thoughts on “How to Sync VSCode Settings Across Any Machines”

    • Yes Barry you are correct. Built-in sync settings is in the beta stage I believe. The main advantage of this sync settings is the same package can be used in other text editors like the sublime text to sync packages.

      Reply

Got something to say? Join the discussion.

Thanks for choosing to leave a comment. Please keep in mind that all comments are moderated according to our comment policy, and your email address will NOT be published or shared. Please Do NOT use keywords in the name field. Let's have a personal and meaningful conversation.