How to Copy VS Code Configs to a Different Machine

How to Copy VS Code Configs to a Different Machine

I work with many students through our various education programs and Nebraska Dev Lab. During the last few days, I have done a lot of code walkthroughs, basically showing students how to implement a feature one line of code at a time.

When we got to the frontend buildout, I started using Visual Studio Code. One feature that works great in VS Code is Format On Save. Some students wanted to configure that feature on their machines, which seemed like it should be easy. But for some unknown reason, just selecting Format On Save wasn’t working.

I started wondering if I could just copy my VS Code configs to a different machine. If the goal was to sync configs between devices, VS Code already has a good mechanism for that. But I wasn’t about to copy my settings to each student‚Äôs machine.

The easiest solution I found was to copy the settings.json file to their computers.

I found the settings.json file on my computer.

On a Mac, the settings.json file can be found at ~/Library/Application Support/Code/User/.

We had to copy these settings to something like c:\users\cmichel\AppData\Roaming\Code\User.

Once this file was copied, their VS Code was updating their source on save.

Below is what my settings.json file looks like.

Related posts