VSCode configuration setting sync plug-in

He said front: Settings
Sync can synchronize your current VSCode configuration environment, when you need to work on other computers, you do not have to start over again. Login new machine to get it.

Install the plugin / extension
1. extension inside Search the list of installed next sync settings sync appear
Here Insert Picture Description
to log in to github, click on the upper right corner of the head, found in the drop-down box settings, click to enter a new page
Here Insert Picture Description
2. Find a new page developer settingsClick to go to the new page
Here Insert Picture Description
3. Locate personal access tokensclick on generate new tokenthe button
Here Insert Picture Description
Here Insert Picture Description
Here Insert Picture Description
Get token
in the red box is the Gist exclusive access token, I called a token
to here completed the first step, get token, the next to go get gistid

4. Re-click on the top right of the picture, click GISTs your
Here Insert Picture Description
5. In the new page, click on the upper right corner + to create a new GISTs
Here Insert Picture Description
1,2,3 enter content as you see fit, such as 1,2,3 ha ha ha ha, in order to facilitate the latter to use and understand, caution is recommended to fill in, and then click the button to create secret gist
Here Insert Picture Description
browser address bar, the last / behind the string of characters is puregistID

Now, the already acquired token to remember and gistID little book inside, to prepare for later use

Next, start using the token and gistid

1.快捷键shift+ctrl+p,选择下图的高级选项
Here Insert Picture Description
进入下图的json文件,修改token值为上述token,保存
Here Insert Picture Description
点击左上角的file->prefrence->settings 搜索sync,在下图所示位置,将上述获取的gistID填写进去
Here Insert Picture Description
接下来就到了使用的时刻了
使用Settings Sync我们需要记住两个快捷键:

Shift + Alt + U将配置环境 扩展插件信息上传到云端

Shift + Alt + D下载云端的配置

所以我们接着上一步 直接在VSCode中使用Shift + Alt + U
1.上传配置
Shift + Alt + U
sync插件会出现下图的文字,也就是执行进度,看到done 我们就知道成功啦Here Insert Picture Description
去github看看,刚才都上传了什么吧~
Here Insert Picture Description
红框中出现的就是我们需要同步的一系列配置信息,再也不是空白了
2.下载配置
当我们换了一台电脑,可以通过gistid来同步之前电脑上vscode的配置信息,也就是从云端download
方法:
登录到github上,点击your gists,找到你想copy的gist,点击进去,假如你没有在此处保管gistID,也可以看embed后边的script标签,点开后里边的字符就是gistID
Here Insert Picture Description
复制gistID,打开VSCode,依旧是在settings里边,搜索sync,把gistID改为你需要复制配置的gistID
Here Insert Picture Description
快捷键Shift+Alt+D下载配置

同步成功 需要重启VSCode

Released two original articles · won praise 1 · views 25

Guess you like

Origin blog.csdn.net/qq_32648491/article/details/104031553