User Settings on VS Code

Learn how to use the settings.json file in VS code.

We'll cover the following

User settings

A code editor is only as good as a developer’s ability to tailor it to their needs. The VS Code team, knowing this, designed for customizability. All user-level customizations live in a single, editable JSON file. The exception is keyboard shortcuts, which have their own dedicated customization file.

Recent versions of VS Code added a friendly, graphical settings interface. However, it’s useful to see what lurks underneath. From the Command Palette, run “Preferences: Open Settings (JSON).” This opens up a JSON file with all of your personal setting overrides. This view doesn’t show you the default setting, though, it’s not very useful by itself. You can remedy that by adding this setting:

 "workbench.settings.useSplitJSON": true

Save the file and reopen the settings file. Now you’ll be taken to a split view, with VS Code’s default settings on the left and your user-level overrides on the right, as shown in the first screenshot below.

If you chose “Always” at the Git commit prompt in the last section, then there will be one other override here: git.enableSmartCommit is set to true. Hovering over the rule’s name gives you a description of its meaning:

Commit all changes when there are no staged changes.

If you’d like to change the look and feel of the editor, now’s your chance. Let’s say you want to change the font. Type “font” in the search bar, and you’ll see several matching settings. Hover over any of the matches and click the pencil icon to copy that setting over to your User Settings, where you can do with it what you like. For example, if 12px is a bit squint-inducing for you, you might copy editor.fontSize to your User Settings and change the value to 14. As soon as you save, the change will take effect, as shown in the second screenshot below.

Get hands-on with 1200+ tech skills courses.