Visual Studio Code Settings and Extensions Migration

Setting up a new workstation is always a hassle as development environments are heavily customized by each developer. Visual Studio Code is no exception. Thankfully, it is quite easy to transfer all the settings between different workstations, even when running different operating systems.


Settings and Keybindings

Moving your custom settings and keybinds is very simple. Just copy the settings.json and keybindings.json files to the appropriate location on the new system.

Platform Location
Windows ~\AppData\Roaming\Code\User\settings.json
Linux ~/.config/Code/User/settings.json
macOS ~/Library/Application Support/Code/User/settings.json


Extensions

There are two options for handling extensions – copy or reinstall. To copy them, simply copy the contents of the ~/.vscode folder. This is the same on all three platforms.

Reinstalling the extensions is a little more complicated. First, list the extensions on the existing machine from the command line:

code --list-extensions

On the new machine, install them from the command line:

code --install-extension <extension name>

On macOS, the command line binary is found within the Visual Studio Code app bundle:

"/Applications/Visual Studio Code.app/Contents/Resources/app/bin/code"


Syncing

The final option is to use an extension that syncs all the settings and extensions between different installations. This is the most complicated and, depending on your situation, may not be the right solution. Often I end up customizing settings per workstation and I actually don't want the settings perfectly synced.

The extension is Settings Sync. It uses your GitHub account to act as a cloud storage for your settings and extensions. It is a nice solution if you really want syncing and it is very configurable so you can exclude certain items, for instance.


Conclusion

Setting up a new workstation isn't the most fun, but these options make it a lot easier. Of all the options, I find simply copying the files over the fastest and easiest. You can even just have them on a flash drive, so if you have to quickly setup on a client's machine, you will be totally prepared.

Question or Comment?