VS Code SetupBeginner

How to Edit User Settings in VS Code (settings.json)

Open both the visual settings UI and the raw settings.json file, change common options safely, and understand where your settings actually live.

7 minBeginner

Almost everything in VS Code is configurable, from font size to how files are saved. There are two ways to change settings: a searchable visual UI and a raw JSON file. Knowing both lets you tweak things quickly and copy configurations between machines. This guide shows where settings live and how to edit them without breaking anything.

What you need

  • VS Code installed
  • A few minutes

Step 1: Open the Settings UI

Press Ctrl+, (Cmd+, on macOS) to open Settings. There is a search box at the top; type what you want, such as font size, and the matching options appear. This UI is the safest way to change a single setting because it validates your input.

VS Code - Settings UI
Settings Search: font size
------------------------------------
Editor: Font Size
Controls the font size in pixels.
[ 14 ]
User Workspace
Searching settings in the visual editor.

Step 2: Switch to the raw JSON file

For bulk changes or to copy a config, edit the JSON directly. Open the Command Palette with Ctrl+Shift+P, type Open User Settings (JSON), and press Enter. The file opens; every setting you change in the UI is stored here.

Step 3: Add common settings

Each setting is a key and value pair. Add the entries below to format on save, trim trailing whitespace, and set a comfortable tab size. Separate entries with commas and keep the outer braces.

settings.json
{
  "editor.fontSize": 14,
  "editor.tabSize": 2,
  "editor.formatOnSave": true,
  "files.trimTrailingWhitespace": true,
  "files.autoSave": "onFocusChange"
}
Watch your commas
JSON does not allow a trailing comma after the last entry, and every entry except the last needs one. If VS Code underlines a line in red, you probably have a comma in the wrong place.

Step 4: Know User vs Workspace settings

User settings apply to every project you open. Workspace settings live in a .vscode/settings.json file inside one project and only affect that project, overriding your user settings. Use workspace settings when a team needs the same config; use user settings for your personal preferences.

Result

You can now change any VS Code option through the UI or by editing settings.json directly, and you know whether a setting belongs to you personally or to a shared project.

Watch related tutorials

Tags
#settings#settings-json#configuration#preferences