Skip to content
Tutorials Center
My learning

Topics

Lesson 8 of 40 ยท Interface and Settings

User, Workspace and Folder Settings

Learn the VS Code settings layers: default, user, remote, workspace and folder. See which wins, share team settings in .vscode, and use Profiles for different setups.

VS Code does not have one settings file; it has layers. A setting can be defined for you as a person, for a project, or for one folder of a multi-root workspace. Understanding which layer wins removes most "why is my editor behaving differently here?" confusion.

The layers

From weakest to strongest:

  1. Default settings: built into VS Code and extensions.
  2. User settings: your personal file, applied to every window.
  3. Remote settings: for a connected remote machine, WSL or container (if you use one).
  4. Workspace settings: stored in a .code-workspace file, or in .vscode/settings.json when you opened a single folder.
  5. Workspace folder settings: a .vscode/settings.json inside one root of a multi-root workspace.

A stronger layer overrides a weaker one for the same key. Language-specific blocks ("[python]") are more specific than general ones and win within the same layer.

flowchart LR
  D[Default] --> U[User] --> R[Remote] --> W[Workspace] --> F[Folder]

Each arrow means "overridden by": the folder layer has the last word.

Switching tabs in the Settings UI

In the Settings UI there are tabs under the search box: User, Workspace (and Remote or folder tabs when relevant). Editing a setting on the Workspace tab writes to the project's .vscode/settings.json. Each tab has its own Open Settings (JSON) icon at the top right, so you always know which file you are editing.

You can also use the Command Palette:

  • Preferences: Open User Settings (JSON)
  • Preferences: Open Workspace Settings (JSON)
  • Preferences: Open Folder Settings (JSON) (multi-root only)

When to use which layer

Put it in... Examples
User Theme, font, zoom, autosave, keyboard behavior, personal habits
Workspace Formatter, tab size, lint rules, search excludes, language-specific tooling the whole team uses
Folder A different Python interpreter or formatter for just one root

The golden rule: shared decisions go to the workspace; personal taste goes to the user file. Committing .vscode/settings.json to Git means the team agrees on "editor.tabSize": 2 and "editor.formatOnSave": true without arguing about it. Committing your favorite theme would be rude.

An example project file:

JSON
{
  "editor.tabSize": 2,
  "editor.formatOnSave": true,
  "editor.defaultFormatter": "esbenp.prettier-vscode",
  "files.exclude": { "**/dist": true },
  "search.exclude": { "**/node_modules": true }
}

Some settings only apply to certain scopes

Each setting has a scope. An application-level setting such as update.mode or window.restoreWindows cannot be set per workspace, and VS Code shows a warning if you try. Security-sensitive settings, for example terminal.integrated.shell.* or paths to executables, are ignored from a workspace that is not trusted (see Workspace Trust). This prevents a downloaded project from pointing your terminal at its own program.

A stand-in: how layers merge

The merge rule is easy to model. This JavaScript stand-in applies the layers in order, with later ones overriding earlier ones, and reports which layer supplied each final value. Real VS Code also merges objects such as files.exclude; the model shows the simple "last wins" rule plus that special object merge.

JS Stand-in: merging settings layers

Press Run (or Ctrl + Enter) to see the console output here.

No output.

Read the output: the tab size is 2 (workspace beat default), word wrap is on (user beat default), and font size is 13 (the folder beat the user). The files.exclude object contains both .git and dist because object settings merge instead of being replaced.

Profiles

A Profile is a named bundle of settings, extensions, snippets, keyboard shortcuts and UI state. Use them to keep different setups separate, for example:

  • Python data science with Jupyter and Python extensions
  • Web with Prettier and ESLint
  • Teaching with a large font, a high-contrast theme and few extensions

Create one from the gear menu: Profiles > New Profile (Command Palette: Profiles: Create Profile). The new profile can start empty, copy the current one, or use a template. Switch between profiles from the gear menu or Profiles: Switch Profile. You can also assign a profile to a workspace so it activates when you open that folder. Profiles can be exported and imported through a shareable link or file.

Settings Sync (sign in through the Accounts icon) can sync profiles across machines.

Debugging "why is this setting like this?"

  1. In the Settings UI, a setting changed in another layer shows a small note: Also modified in: Workspace. Click it to jump to that tab.
  2. Check the language: a "[typescript]" block can override your general value.
  3. Check Settings Sync and Profiles: you may be in a different profile than you think.
  4. Use Developer: Open Process Explorer or the Output panel only for extension problems; for settings, @modified plus the tabs usually reveals the culprit.

Check your understanding

Quick check ยท 4 questions

of 4 answered You scored / 4 ยท perfect!

  1. 1. Which layer has the final say among these?

    Folder settings in a multi-root workspace are the most specific layer and override workspace, user and default values.
  2. 2. Where should a team put the formatter choice so everyone shares it?

    Workspace settings in .vscode/settings.json can be committed so the whole team shares them.
  3. 3. What happens to an object setting like files.exclude across layers?

    Object-valued settings are merged across layers, so entries from several layers combine.
  4. 4. What is a Profile in VS Code?

    Profiles let you switch between separate setups, such as one for web work and one for data science.

Summary

  • Settings layer as Default, User, Remote, Workspace and Folder; later layers win.
  • Share project rules in .vscode/settings.json; keep personal taste in User settings.
  • Object settings merge; other values are replaced.
  • Some settings are application-only or disabled in untrusted workspaces.
  • Profiles bundle settings and extensions for different kinds of work.

Next: Keyboard Shortcuts