VS Code Editor Settings Cheat Sheet

Sidebar

Programming · VS Code Editor Settings Cheat Sheet

The editor.* family of VS Code settings: the exact ID to search for, what it does, and its default. Defaults shown are for a recent Windows install; Preferences: Open Default Settings (JSON) shows yours.

Finding & Changing Settings

Ctrl+,Opens the Settings editor (search box at the top)
Preferences: Open User Settings (JSON)Command Palette (Ctrl+Shift+P); edits your settings.json directly
Preferences: Open Workspace Settings (JSON)Project-only settings, saved in .vscode/settings.json
Preferences: Open Default Settings (JSON)Read-only list of every setting with its default value
@modifiedSearch filter: shows only settings you have changed
@id:editor.tabSizeSearch filter: jump to one exact setting ID
@lang:pythonSearch filter: settings that can be set per language

Setting Scope & Precedence

UserApplies to every project on this machine
WorkspaceOverrides User for the open project (.vscode/settings.json)
"[python]": { … }Language block in settings.json: overrides for one language only
// commentssettings.json is JSON with comments, so comments and trailing commas are allowed

Font & Cursor

editor.fontSizeFont size in pixels (default 14 on Windows/Linux, 12 on macOS)
editor.fontFamilyComma-separated font list, e.g. "Cascadia Code, Consolas, monospace"
editor.fontLigaturestrue joins symbols like => into one glyph (default false; needs a ligature font)
editor.lineHeight0 = automatic (default); a small number is a multiple, a larger one is pixels
editor.cursorStyleline (default), block, underline, line-thin, block-outline, underline-thin
editor.cursorBlinkingblink (default), smooth, phase, expand, solid
editor.cursorSmoothCaretAnimationoff (default), explicit, on: the caret glides instead of jumping
editor.smoothScrollingtrue animates scrolling (default false)
editor.mouseWheelZoomtrue: Ctrl + mouse wheel changes the font size (default false)

Indentation

editor.tabSizeWidth of a tab in spaces (default 4)
editor.insertSpacestrue (default): pressing Tab inserts spaces, not a tab character
editor.detectIndentationtrue (default): VS Code guesses tabs/spaces from the open file and overrides the two above
editor.autoIndentHow new lines are indented: full (default), advanced, brackets, keep, none
editor.guides.indentationVertical indent guide lines (default true)
Status bar: Spaces: 4Click it to switch one file between tabs and spaces, or to convert its indentation

Wrapping & Layout

editor.wordWrapoff (default), on, wordWrapColumn, bounded
editor.wordWrapColumnColumn used by wordWrapColumn and bounded (default 80)
editor.rulersVertical lines at given columns, e.g. [80, 120] (default none)
editor.lineNumberson (default), off, relative, interval
editor.minimap.enabledThe code overview strip on the right (default true)
editor.scrollBeyondLastLinetrue (default) lets you scroll past the last line
editor.foldingShow fold arrows in the gutter (default true)
editor.stickyScroll.enabledPins the current function/class headers at the top while scrolling (true by default in recent versions)

Whitespace & Brackets

editor.renderWhitespacenone, boundary, selection (default), trailing, all
editor.renderControlCharactersShow invisible control characters (default true)
editor.bracketPairColorization.enabledMatching brackets in matching colours (default true)
editor.guides.bracketPairsLines joining bracket pairs: false (default), true, "active"
editor.matchBracketsHighlights the partner of the bracket next to the cursor (default always)
editor.renderLineHighlightHighlight the current line: none, gutter, line (default), all

Formatting & Saving Actions

editor.formatOnSaveFormat the file whenever you save (default false)
editor.formatOnPasteFormat pasted text (default false)
editor.formatOnTypeFormat as you type, e.g. after ; or Enter (default false)
editor.defaultFormatterThe extension ID that formats files, e.g. "esbenp.prettier-vscode" (default none)
editor.codeActionsOnSaveRun fixes on save, e.g. { "source.organizeImports": "explicit" } (default {})
Shift+Alt+FFormat the whole document right now (Windows/Linux)

Suggestions & Typing Help

editor.quickSuggestionsPop-up suggestions while typing: on in code, off in comments and strings by default
editor.acceptSuggestionOnEnteron (default), smart, off: whether Enter accepts the suggestion
editor.suggestSelectionWhich suggestion is pre-selected: first (default), recentlyUsed, recentlyUsedByPrefix
editor.snippetSuggestionsWhere snippets sit in the list: top, bottom, inline (default), none
editor.tabCompletionoff (default), on, onlySnippets: Tab accepts a suggestion
editor.autoClosingBracketslanguageDefined (default), always, beforeWhitespace, never
editor.linkedEditingtrue: renaming an HTML tag also renames its partner (default false)
editor.inlayHints.enabledInline hints such as parameter names: on, onUnlessPressed, offUnlessPressed, off

A Reasonable Starter Set (my suggestions, not defaults)

"editor.formatOnSave": trueConsistent formatting without thinking about it (pick a formatter first)
"editor.minimap.enabled": falseMore room, and rarely missed
"editor.renderWhitespace": "boundary"Shows stray double spaces without clutter
"editor.rulers": [100]A gentle line-length marker
"editor.guides.bracketPairs": "active"Helps read nested code
"editor.smoothScrolling": trueEasier on the eyes
"editor.mouseWheelZoom": trueQuick zoom for presentations and tired eyes
"[markdown]": { "editor.wordWrap": "on" }Wrap only prose files, not code
Why did my tab size change by itself?
editor.detectIndentation is true by default, so VS Code looks at each file and uses whatever indentation it finds there, ignoring editor.tabSize and editor.insertSpaces. If your settings seem to be ignored, set "editor.detectIndentation": false or change the indentation from the Spaces: 4 item in the status bar.