preface

I’ve been using sublime Text lift code for a long time, because of its light weight and rich plug-ins, I carry it with me from one computer to another, and because I don’t need to install it, I simply copy the folders from each computer to the next, so I don’t have to install plug-ins from scratch. However, as the project grew and I liked to open a lot of tabs, sublime was often unresponsive and had to restart due to low memory (mostly the old office computer was low on memory, 8GB). So I started to try to use VS Code, Yiyang rich plug-ins, but will not be stuck to restart, well, it’s you. After using it for a while, I installed one on my laptop and realized that there was nothing to play with, so I went online to find out how to synchronize the plugins and configurations.

How to synchronize

  1. Setting Sync is a plugin that provides github Gist to synchronize configuration information
  2. Type CTRL + P, enter >sync in the input box, and select upload Settings, or simply use the shortcut keys Shift + Alt + U
  3. The browser will pop up github.com/settings/to… If you log on to Github, you can see all the token configurations directly
  4. Click the Generate New Token button to create a new token

    5. Enter a Token description, such as vscode_sync, check gist, and click Generate Token to confirm

    6. After confirming the token value, copy it and enter the input box at the top of vscode

    7. And then it generates a GIST ID, which is useful, so you better remember it, but if you don’t remember it, you’ll find it later, but we’ll talk about that later. 8. Now that the configuration has been uploaded successfully, what you need to do is to install a Setting Sync plug-in on vscode of the target computer, and then use the shortcut key Shift + Alt + D. At this time, you will be asked to fill in the token for authentication as you did on the previous computer

    9. Once the token is verified, you will need to use the Gist Id that was originally generated. After filling in the correct Gist Id, you will start synchronizing the plugin and configuration.

Access token forgotten what to do

Find the access tokens you named, click on them and then click the Regenerate token button. I thought the tokens could only be used once and then they were gone. It’s important to learn English and don’t be afraid to read English words. Speak up to the popular Regenerate.

What if I forget Gist Id

Gist Id is only seen when you upload your configuration for the first time, so what if you change computers and want to synchronize your configuration later?

Go to: gist.github.com/ –> click on your GIST file, and then the last parameter on the URL is gist.github.com//

conclusion

The two key points to synchronizing your configuration with Github GIST are:

  • Access token for authentication
  • Gist ID that identifies configuration information

reference

  • The VScode Sync plugin syncs between devices