How to open Visual Studio Code's 'settings.json' file
command-palette, json, preference, settings, visual-studio-code
Solution
To open the User settings:
- Open the command palette (either with F1 or Ctrl+Shift+P)
- Type "open settings"
- You are presented with a few options¹, choose Open User Settings (JSON)
This image was taken in the VS Code online editor
Which, from the manual and 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 includes a button in the Settings UI gutter which can be used to switch between JSON and graphical view.
The `workbench.settings.editor` option selects which of the settings files is opened by default when not using the above method, such as with the shortcut ⌘+, or through the application menu.
Footnotes
The aforementioned settings, User and Workspace. Remote settings will appear when using WSL.
By a test this maps to `%APPDATA%\Roaming\Code\User\settings.json`, I am not sure by what logic.
Problem
I did it many times, and each time I forgot where it was. Menu File → Preferences → Settings. I get this: I want to open file settings.json (editable JSON file) instead. How can I do that?