User Settings

User settings are global settings that are applied to all VS Code instances and in Windows OS they are located at: ~/cdrive/Users/User/AppData/Roaming/Code/User

{
    "workbench.colorTheme": "Default Dark Modern",
    "extensions.ignoreRecommendations": true,
    "window.zoomLevel": -1,
    "security.allowedUNCHosts": ["wsl.localhost"],
    "workbench.startupEditor": "none",
    "git.openRepositoryInParentFolders": "never",
    "git.ignoreMissingGitWarning": true,
    "jupyter.interactiveWindow.creationMode": "perFile",
    "editor.minimap.enabled": false,
    "editor.rename.enablePreview": false,
    "workbench.editor.enablePreview": false,
    "editor.lineNumbers": "off",
    "security.workspace.trust.untrustedFiles": "open"
}

We can open the User Settings with the keyboard shortcut Ctrl + Shift + P that opens the command palette and then type “Open User Settings” to find the Preferences: Open User Settings (JSON) command.

Key bindings for Visual Studio Code

In the same location there is also the key bindings JSON file

// Place your key bindings in this file to override the defaults
[
    {
        "key": "ctrl+enter",
        "command": "workbench.action.terminal.runSelectedText"
    },
 
    {
        "key": "ctrl+r",
        "command": "python.execSelectionInTerminal",
        "when": "editorTextFocus && !findInputFocussed && !jupyter.ownsSelection && !notebookEditorFocused && !replaceInputFocussed && editorLangId == 'python'"
    },
    {
        "key": "shift+enter",
        "command": "-python.execSelectionInTerminal",
        "when": "editorTextFocus && !findInputFocussed && !jupyter.ownsSelection && !notebookEditorFocused && !replaceInputFocussed && editorLangId == 'python'"
    }
]

Workspace settings.json location

Similar to User Settings, Workspace Settings, apply to the open folder or workspace, are also stored in a settings.json file, which you can edit directly via the Preferences: Open Workspace Settings (JSON) command.

The workspace settings file is located under the .vscode folder in your project’s root folder.

{
  "debug.console.fontSize": 12,
  "markdown.preview.fontSize": 12,
 
  "terminal.integrated.fontFamily": "'Cascadia Code', monospace",
  "terminal.integrated.fontSize": 13,
  "terminal.integrated.lineHeight": 1.1,
  
  "window.zoomLevel": 0.3,
  "files.autoSave": "afterDelay",
  "explorer.sortOrder": "filesFirst",
 
  "workbench.startupEditor": "none",
  "workbench.tree.indent": 9,
  "workbench.iconTheme": "material-icon-theme",
  "workbench.list.openMode": "doubleClick",
  "workbench.editor.empty.hint": "hidden",
 
  "[python]": {
    "editor.formatOnType": true
  },
  "python.terminal.launchArgs": ["-m", "IPython", "--no-autoindent"],
  "jupyter.interactiveWindow.creationMode": "perFile",
 
  "notebook.output.textLineLimit": 100,
  "notebook.output.scrolling": true,
 
  "[typescript]": {
    "editor.defaultFormatter": "vscode.typescript-language-features"
  },
 
  "editor.rulers": [105],
  "editor.cursorBlinking": "expand",
  "editor.lineNumbers": "off",
  "editor.minimap.enabled": false,
  "editor.wordWrap": "on",
  "editor.fontFamily": "Cascadia Code",
  "editor.fontLigatures": true,
  "editor.fontSize": 12,
  "editor.codeActionsOnSave": {},
  "editor.formatOnSave": true,
  "editor.unicodeHighlight.ambiguousCharacters": false,
 
  "git.decorations.enabled": false,
  "git.openRepositoryInParentFolders": "never",
 
  "extensions.ignoreRecommendations": true
}

Workspace settings are specific to a project and can be shared across developers on a project. Workspace settings override user settings. You can edit via the Settings editor Workspace tab or open that tab directly with the Preferences: Open Workspace Settings command.