I\'d like to be able to sync my VS Code user settings (File > Preferences > User Settings) to the cloud somehow so I can easily share them between multiple installatio
Aha, you can try my VSCode extension: Syncing.
Hoping you'll like it. :)
Install Syncing:
Get your own GitHub Personal Access Token:
Login to your GitHub Settings page.
Select Personal access tokens tab and click Generate new token.
Select gist and click Generate token.
Copy and backup your token.
Sync your settings:
Syncing will ask for necessary information for the first time and save for later use.
Upload:
Type upload in VSCode Command Palette.
Enter your GitHub Personal Access Token.
Enter your Gist ID (or leave it blank to create automatically).
Done!
After uploading, you can find your settings and the corresponding Gist ID in your GitHub Gist.
Download:
Type download in VSCode Command Palette.
Enter your GitHub Personal Access Token (or leave it blank if you want to download from a public Gist)
Enter your Gist ID (or a public Gist ID).
Done!
I place my settings.json in a configuration file that I sync with git (though Dropbox would also work) and use a Python script to symlink it to the correct location for each platform so updating it from the settings menu syncs across my machines. Creating symlinks requires admin privileges on Windows.
import os
import platform
# Find the settings file in the same directory as this script
SCRIPT_DIR = os.path.dirname(os.path.realpath(__file__))
VS_SETTINGS_SRC_PATH = os.path.join(SCRIPT_DIR, 'settings.json')
# https://code.visualstudio.com/docs/getstarted/settings#_settings-file-locations
if platform.system() == 'Windows':
VS_SETTINGS_DST_PATH = os.path.expandvars(r"%APPDATA%\Code\User\settings.json")
elif platform.system() == "Darwin":
VS_SETTINGS_DST_PATH = os.path.expandvars(r"$HOME/Library/Application Support/Code/User/settings.json")
elif platform.system() == "Linux":
raise NotImplementedError()
else:
raise NotImplementedError()
# On Windows, there might be a symlink pointing to a different file
# Always remove symlinks
if os.path.islink(VS_SETTINGS_DST_PATH):
os.remove(VS_SETTINGS_DST_PATH)
choice = input('symlink %r -> %r ? (y/n) ' % (VS_SETTINGS_SRC_PATH, VS_SETTINGS_DST_PATH))
if choice == 'y':
os.symlink(VS_SETTINGS_SRC_PATH, VS_SETTINGS_DST_PATH)
print('Done')
else:
print('aborted')
I have developed an extension that will sync all your Visual Studio Code Settings across multiple instances.
Key Features
It Sync
Detail Documentation Source
VSCode - Settings Sync blog post
Download here : VS Code - Settings Sync - Extention
In v1.48:
Preview features
Preview features are not ready for release but are functional enough to use. We welcome your early feedback while they are under development.
Settings Sync
Settings Sync is now available for preview in the stable release