Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

What are the differences between vscode's user settings and workspace settings

Shulou Source: shulou.com Published: 2022-06-02 15:14:05 10月04日 Update

Editor to share with you what are the differences between vscode user settings and workspace settings. I hope you will gain something after reading this article. Let's discuss it together.

Difference: user Settings should be used for all projects opened by the user; Workspace Settings apply only to the VS Code settings of the current directory. Note: workspace Settings overrides user Settings.

User settings and workspace settings

VS Code provides two settings:

-user settings: settings made in this way will be applied to all projects opened by the user

-Workspace settings: workspace refers to a folder opened using VS Code. A hidden folder named .vscode will be created under this folder, which contains the settings of VS Code that are only applicable to the current directory. The settings of the workspace will override the user's settings.

Everyone has their own preferences, and when developing with VS Code, they will configure VS Code at the user level according to their own habits.

However, when multiple people work together to complete a project, the project will have certain coding specifications, such as: the settings when editing a language, the indentation of the code, etc., which requires a separate workspace-level setting for the project.

Change default user settings and workspace settings

The settings file for VS Code is setting.json. The files set by the user are saved in the following directory:

-Windows% APPDATA%\ Code\ User\ settings.json

-Linux $HOME/.config/Code/User/settings.json

The files for the workspace settings are saved in the .vscode folder of the current directory.

Two ways to change the default settings

-use the editor to directly open the setting.json file to set up

-Click File > preferences > Settings in VS Code to open the settings panel to make settings

After reading this article, I believe you have a certain understanding of "what are the differences between vscode user settings and workspace settings". If you want to know more about it, you are welcome to follow the industry information channel. Thank you for reading!

Tags: Users work files spaces workspaces folders directories methods projects projects times articles levels applications code creativity preferences multiple people done more Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Apple OPPO Reno Docker Redmi Linux