VSCode 中Settings Sync插件的设置

(1)先装好Settings Sync插件

VSCode 中Settings Sync插件的设置

(2)取得github登陆的tokens

1)登陆https://github.com/settings/tokens设置tokens,需要选择这个tokens的scope也就是应用范围,选择gist。生成的这个tokens相当于新的身份证明。

VSCode 中Settings Sync插件的设置

2)第二次进入这个网址就看不到tokens了。

VSCode 中Settings Sync插件的设置

(3)在VSCode中设置tokens

在VSCode的命令行输入syncLocalSettings.json,在里面设置tokens。

VSCode 中Settings Sync插件的设置

(4)取得gist ID

Gist相当于一个仓库,在github的ID(tokens)下可能有很多gist,需要将其中一个gist空出来保存VSCode的配置,而Setting
Sync这个插件的作用就是将VSCode中的配置文件上传到这个gist。 如果不知道gist ID如何获取,
1)先进入到:
https://gist.github.com/username 其中username是你的github登录名
2)再点击你想要将VSCode配置文件储存的仓库,也就是指定gist。如果当前的gist不是你想要的,可以新建一个gist,配置其gist
description。
3)然后url上的最后的参数就是gist ID
https://gist.github.com/usernam/gist ID

VSCode 中Settings Sync插件的设置

(5)在VSCode中设置gist ID

在VSCode的命令行输入settings.json,在里面设置sync.gist。

VSCode 中Settings Sync插件的设置

(6)使用Setting Sync 上传下载配置

Shift + Alt +U 上传本地配置
Shift + Alt + D 下载云端配置

VSCode 中Settings Sync插件的设置

(7)gist上不去的办法

打开C:\Windows\System32\drivers\etc\hosts,在末尾加入
192.30.253.112 github.com
192.30.253.119 gist.github.com
151.101.100.133 assets-cdn.github.com
151.101.100.133 raw.githubusercontent.com
151.101.100.133 gist.githubusercontent.com
151.101.100.133 cloud.githubusercontent.com
151.101.100.133 camo.githubusercontent.com
151.101.100.133 avatars0.githubusercontent.com
151.101.100.133 avatars1.githubusercontent.com
151.101.100.133 avatars2.githubusercontent.com
151.101.100.133 avatars3.githubusercontent.com
151.101.100.133 avatars4.githubusercontent.com
151.101.100.133 avatars5.githubusercontent.com
151.101.100.133 avatars6.githubusercontent.com
151.101.100.133 avatars7.githubusercontent.com
151.101.100.133 avatars8.githubusercontent.com

(8)参考文档

[1]vscode sync插件 在不同设备 同步的坑
[2]github上不去解决方法