VS Code plug-in — Settings Sync: Set up and synchronize user configurations on different devices (implemented via Github)

你越是认真生活,你的生活就会越美好——Frank Lloyd Wright
"The Fruit of Life" Classic Quotations

Recently, my computer
gets angry from time to time, so I’m going to get ready 不同设备同步vsCode配置信息, just in case
Insert picture description here

Insert picture description here

1 Install the plugin Settings Sync

Search in VSCode extension, Settings Syncrestart after installation
Insert picture description here

2 Open Git and generate Token

Click to enter the git page: tokens ,

Then click the generate new token
written tokendescription, check gist options
Click Generate tokento generate access token. (Note:access token 一定要保存,只会出现一次 )
Insert picture description here

Insert picture description here

Insert picture description here

Insert picture description here
Here personal access tokenis the text prompt on the previous line,, 该token只会出现一次so everyone 记得保存down

Make sure to copy your new personal access token now. You won’t be able to see it again!
Insert picture description here

3. Configure the token locally (the device that needs to upload settings)

In VSCode press ctrl (Mac is by command) + shift + p,
enter: Sync: Advanced Options,
and then select Sync: Edit Extension Local Settings,
edit syncLocalSettings.jsonthe configuration file.
Search for " token" in this file , set the corresponding value (string format) to the one just generated on Git Token Id, and save
Insert picture description here
Insert picture description here

4. Upload the local settings

In VSCode, press ctrl (command on Mac) + shift + p, enter sync, and click Sync: Upload / Update Settings (upload settings)

After the upload is successful, 控制台 outputa series of information will appear in the meeting, remember Github Tokenand Github Gist.
Github TokenIt is equivalent to the password,
Github Gistyou save it Github Gist 的 id, and you will use these two information to download the configuration in the future
Insert picture description here
Insert picture description here

Insert picture description here
Insert picture description here

Insert picture description here

5. Download the configuration in the new device

Need to log in on new deviceGithub

  • Installation of Settings Syncexpansion, and restart
  • Repeat step 3, in the configuration file, change the corresponding value of "token" to tokenid
  • ctrl(mac 是 command) + shift + p,
  • Enter sync, click Sync: Download Settings (download configuration)
  • Enter Gist Id (you can also jump to the git page for authorization)
  • Start downloading the configuration and finish

Insert picture description here
Insert picture description here

6. Restart VScode

After the configuration information is downloaded successfully, restart VScode


谢谢你阅读到了最后~
期待你关注、收藏、评论、点赞~

Recommended reading

The settings (node_global and node_cache)
hardcore after node installation ! 30 pictures of HTTP common interview questions and
15 beautiful moving pictures to fully explain CORS (cross-domain resource sharing, same-origin policy)

Reference link
VS Code plug-in — Settings Sync: Set up and synchronize user configurations on different devices

Guess you like

Origin blog.csdn.net/weixin_42752574/article/details/109966472