How can I open Visual Studio Code's 'settings.json' file?
Visual Studio-CodeVisual Studio-Code Problem Overview
Visual Studio-Code Solutions
Solution 1 - Visual Studio-Code
To open the User settings:
- Open the command palette (either with F1 or Ctrl+Shift+P)
- Type "open settings"
- You are presented with two options, choose Open Settings (JSON)
Which, depending on platform, is one of:
- Windows
%APPDATA%\Code\User\settings.json
- macOS
$HOME/Library/Application\ Support/Code/User/settings.json
- Linux
$HOME/.config/Code/User/settings.json
The Workspace settings will be in a {workspaceName}.code-workspace
file where you saved it, and the Folder settings will be in a .vscode
folder if and when it has been created.
Official page on User and Workspace Settings
As stated by sevencardz below, VS Code now includes a button in the Settings UI gutter which can be used to switch between editor and graphical view. The workbench.settings.editor
option selects which of these is opened by default when not using the above method, such as ⌘+, or through the application menu.
Solution 2 - Visual Studio-Code
On the settings UI page, there's a special button in the top right corner gutter that toggles between the settings.json file and the settings UI.
Bonus Answer:
Add "workbench.settings.editor": "json" to your settings.json file. This will make it so that menu File → Preferences → Settings or ⌘ + , opens your settings.json file 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"
}
Solution 3 - Visual Studio-Code
Follow these steps:
- Shift + CMD + P
- Type "settings"
- Click on "Preferences: Open Settings (JSON)"
Solution 4 - Visual Studio-Code
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 file or the folder .vscode do not exist, you can create them in the folder directory.
These settings will apply to the specific project.
Solution 5 - Visual Studio-Code
These changes are global, so it will affect all of your projects.
-
You can change the settings.json file from user preferences.
Menu File → Preferences → Settings → Extensions → search for "Edit in settings.json"
-
Eventually edit these files directly:
- Linux:
$HOME/.config/Code/User/settings.json
- macOS:
$HOME/Library/Application Support/Code/User/settings.json
- Windows:
%APPDATA%\Code\User\settings.json
- Linux:
Solution 6 - Visual Studio-Code
On Windows:
- Click (Fn) + F1 (or Ctrl + P + >)
- Type open settings json
Select Preferences: open settings (JSON)
Solution 7 - Visual Studio-Code
On a Mac the settings file is found at ~/Library/Application\ Support/Code/User/settings.json
- it can be opened from the command line:
open -a 'visual studio code.app' ~/Library/Application\ Support/Code/User/settings.json