Difference: "User Settings" will apply to all projects opened by the user; "Workspace Settings" only applies to the settings of VS Code in the current directory. Note: "Workspace Settings" will override "User Settings".
Recommended: "vscode Basic Tutorial"
User Settings and Workspace Settings
VS Code provides two setting methods:
- User Settings: Settings made in this way will Applies to all projects opened by this user;
- Workspace settings: The workspace refers to a folder opened using VS Code, and a folder named The hidden folder of .vscode contains VS Code settings that only apply to the current directory. Workspace settings will override user settings.
Everyone has their own preferences. When developing with VS Code, they will configure VS Code at the user level according to their own habits.
But when multiple people complete a project together, the project will have certain coding standards, such as: settings when editing a certain language, code indentation, etc. At this time, it is necessary to Projects are set up at the individual workspace level.
Change the default user settings and workspace settings
The settings file of VS Code is setting.json. User settings files are saved in the following directory:
- Windows %APPDATA%\Code\User\settings.json
- Linux $HOME/.config/Code/User/settings.json
The files set by the workspace are saved in the .vscode folder of the current directory.
Two ways to modify the default settings
- Use the editor to directly open the setting.json file for settings;
- Click on the VS Code file > Preferences> Settings, you can open the settings panel for settings;
For more programming-related knowledge, please visit:Introduction to Programming! !
The above is the detailed content of What is the difference between vscode's user settings and workspace settings?. For more information, please follow other related articles on the PHP Chinese website!