vscode setting 2022-08-31

see more for: https://code.visualstudio.com/docs/getstarted/settings

overview

VS Code provides several different scopes for settings. When you open a workspace, you will see at least the following two scopes:

User Settings - Settings that apply globally to any instance of VS Code you open.
Workspace Settings - Settings stored inside your workspace and only apply when the workspace is opened. Workspace settings override user settings.

setting editor

You can open the Settings editor from the Command Palette (⇧⌘P) with Preferences: Open Settings or use the keyboard shortcut (⌘,).

Edit User Settings

The Settings editor is the UI that lets you review and modify setting values that are stored in a settings.json file. You can review and edit this file directly by opening it in the vscode editor with the Preferences: Open Settings (JSON) command. Settings are written as JSON by specifying the setting ID and value.

with the command above we can open the user settings.json, which is located as ~/Library/Application Support/code/User/settings.json in macos

User Settings file locations#

Depending on your platform, the user settings file is located here:

  • Windows %APPDATA%\Code\User\settings.json
  • macOS $HOME/Library/Application\ Support/Code/User/settings.json
  • Linux $HOME/.config/Code/User/settings.json

Edit Workspace Settings

Workspace settings are specific to a project and can be shared across developers on a project. Workspace settings override user settings.

Note: A VS Code "workspace" is usually just your project root folder. Workspace settings as well as debugging and task configurations are stored at the root in a .vscode folder. You can also have more than one root folder in a VS Code workspace through a feature called Multi-root workspaces. You can learn more in the What is a VS Code "workspace"? article.

You can edit via the Settings editor Workspace tab or open that tab directly with the Preferences: Open Workspace Settings command.

Workspace settings.json location#

Similar to User Settings, Workspace Settings are also stored in a settings.json file, which you can edit directly via the Preferences: Open Workspace Settings (JSON) command.

The workspace settings file is located under the .vscode folder in your root folder.

你可能感兴趣的:(vscode setting 2022-08-31)