VS Code: How to open settings.json file?
- Open the command palette (either with F1 or Ctrl+Shift+P)
- Type "open settings"
- You are presented with two options, choose "Open Settings (JSON)"
On the settings UI page, there's a special button in the top right corner gutter that toggles between the settings.json
and the settings UI.
Bonus Answer:
Add "workbench.settings.editor": "json"
to your settings.json
. This will make it so that File -> Preferences -> Settings
opens your settings.json by default. Optionally, add a comment at the top to remind yourself where the toggle button is.
// click the Open Settings (UI) button in the top right corner gutter to toggle the settings UI
{
// other settings in settings.json
// ...
"workbench.settings.editor": "json"
}
Follow these steps:
- Shift + CMD + P
- Type "settings"
- Click on "preferences: open settings(JSON)"
Visual Studio Code Tips and Tricks
If you want to edit local workspace/folder settings instead of global user settings, you can edit the file .vscode/settings.json
(shortcut: CTRL/CMD
+ P
and type "settings.json").
If that settings.json or the folder .vscode do not exist, you can create them in the folder directory.
These settings will apply to the specific project.
This changes are global, so it will affect all of your projects.
- You can change the settings.json from user preferences.
File -> Preferences -> Settings -> Extensions -> Search for "Edit in settings.json"
- Eventually edit those files directly.
- Linux
$HOME/.config/Code/User/settings.json
- macOS
$HOME/Library/Application Support/Code/User/settings.json
- Windows
%APPDATA%\Code\User\settings.json