4 Ways To Open VSCode settings.json

VSCode stores almost all of its configuration in a file called settings.json. Most of the time, you won’t have to touch it more than once in a while. But if you’re experimenting with a new language, or testing a new set of tools, you may have to regularly open settings.json in order to switch things on and off.

In this article, we will show you 4 different ways to open VSCode settings.json, ranked by how quickly you can do it.

Open settings.json using icon

Basically, what we’re going to do is adding an shortcut icon to the interface of VSCode, so that every time you need to reopen settings.json, you can get it done in a single click.

Follow the instructions below to set the icon up.

  1. Press either Ctrl + , (comma) on Windows, or ⌘ + , (comma) on Mac to open up Settings tab. Please do note that this is User Settings, not Workspace Settings
  2. Click on the Open Settings (JSON) icon in the upper right corner of the editor.
  3. Voila! A new tab will be opened which contains settings.json contents.

Open settings.json using Command Palette

Although opening settings.json using the method above is fast, it involves clicking, which may not be what the keyboard ninjas like us preferred.

Luckily, you can use VSCode Command Palette to open settings.json without any mouse clicks. Follow the instructions below to do that.

  1. Press Ctrl + Shift + P on Windows or ⌘ + Shift + P on Mac to open the Command Palette.
  2. Type settings.json into command palette’s input box.
  3. Once you see Preferences: Open User Settings (JSON) show up in the results, use arrow keys to select it (if needed) and press Enter. The other Preferences: Open Default Settings (JSON) option opens the read-only defaultSettings.json file.
  4. settings.json contents will be opened in the new tab. You can right click on the tab and “pin” it, so that it will be found easily during current session.

Open settings.json using the menu bar

Veteran VSCode users normally don’t use the menu, as the Command Palette serves them pretty well. However, it’s worth mentioning that VSCode allows you to access settings.json from its menu bar:

  1. Select File > Preferences > Settings in the menu bar.
  2. The UI version of VSCode settings will then be opened in a new tab.
  3. Click on the Open Settings (JSON) icon in the upper right corner of the editor to open settings.json.

Open settings.json file directly

You can also access settings.json file directly from the disk. Depending on the platform you’re using, settings.json can be located in one of these path.

On Windows:

C:\Users\<your_user>\AppData\Roaming\Code\UserCode language: HTML, XML (xml)

On macOS:

/Users/<your_user>/Library/Application Support/Code/UserCode language: HTML, XML (xml)

On Linux systems:

/home/<your_user>/.config/Code/UserCode language: HTML, XML (xml)

Remember to replace <your_user> with your username to suit your systems. You don’t have to open settings.json in VSCode, as any text editor will do. Simply make the necessary modifications into the file and then save it.

We hope that the information above is useful to you. If you’re interested in advanced editing features of VSCode, check out our post on How to automatically indent your code and format JSON in Visual Studio Code.

Leave a Comment