VSCode是一個非常優秀的編輯器,我們可能會在不同的電腦上都會使用VSCode, VSCode中安裝有許多插件, 如何讓這些插件在不同的電腦之間同步呢,以便我們開發的時候有個一致的開發環境。
使用github GIST, 網址是https://gist.github.com
,當然它遠不止可以同步插件,還可以同步以下內容。
具體步驟如下:
1.在VSCode中先安裝插件settings Sync
2.F1輸入命令sync
3.選擇Update/Upload Settings,如果是新創建的話全產生gist id,如果是想下載的話,選擇Downlad Settings.
github token: 88cbd8d0daf7c03xxxxx39c094f00
Sync: Upload Complete. GIST ID: 54c3bf9719f4xxxxxxa8eca48181. Please copy and use this ID in other machines to download settings.
下面是官網的原文:
You can always verify created gist by going to https://gist.github.com
and checking for a gist named cloudSettings
Upload Your Settings
Press Shift + Alt + U (macOS: Shift + Option + U)
Type ">Sync" In Command Palette into order download / upload
When downloading or uploading for the first time, the welcome page will automatically open, where you can configure the Settings Sync.
Once you select upload, after uploading the settings. You will see the Summary details with the list of each files and extensions uploaded.
Download your Settings
Press Shift + Alt + D (macOS: Shift + Option + D)
Type ">Sync" In Command Palette into order download / upload
When downloading or uploading for the first time, the welcome page will automatically open, where you can configure the Settings Sync.
Once you select download, after downloading. Settings Sync will display you Summary containing the list of each files and extension being downloaded.
New popup will be opened to allow you to restart the code to apply the settings.