VS Code Terminal Cheat Sheet

Sidebar

Programming ยท VS Code Terminal Cheat Sheet

The integrated terminal's terminal.integrated.* settings, written out in full so you can search for them. Windows names are used for the profile settings (.windows); macOS and Linux have .osx and .linux twins. Sheet 5 in the VS Code series.

Opening & Managing Terminals

Ctrl+`Show or hide the terminal panel
Ctrl+Shift+`Open a new terminal
Ctrl+Shift+5Split the current terminal
Ctrl+PageUp / Ctrl+PageDownMove between terminals (when the terminal has focus)
Terminal: Select Default ProfileCommand Palette command: pick PowerShell, Command Prompt, Git Bash or WSL
Terminal: Rename / ClearCommand Palette commands: name the active terminal / clear its output
Ctrl+FFind text in the terminal output (when the terminal has focus)

Shell & Profiles

terminal.integrated.defaultProfile.windowsProfile name used for new terminals; null (default) means the system default, usually PowerShell
terminal.integrated.profiles.windowsDefines the profiles; e.g. { "Git Bash": { "source": "Git Bash" } }
terminal.integrated.cwdFolder a new terminal starts in (default: the workspace folder)
terminal.integrated.splitCwdFolder for a split terminal: inherited (default), workspaceRoot, initial
terminal.integrated.env.windowsExtra environment variables, e.g. { "MY_VAR": "value" } (default {})
terminal.integrated.inheritEnvtrue (default): new terminals inherit VS Code's environment
terminal.integrated.useWslProfilestrue (default): list installed WSL distributions as profiles
terminal.integrated.defaultLocationview (default, the bottom panel) or editor (terminals open as editor tabs)

Font & Cursor

terminal.integrated.fontSizeTerminal font size in pixels (default 14)
terminal.integrated.fontFamilyFont for the terminal; empty (default) uses editor.fontFamily
terminal.integrated.lineHeightLine spacing multiplier (default 1)
terminal.integrated.letterSpacingExtra pixels between characters (default 0)
terminal.integrated.fontWeightnormal or a number from 1 to 1000
terminal.integrated.cursorStyleblock (default), line, underline
terminal.integrated.cursorBlinkingBlinking cursor (default false)
terminal.integrated.cursorWidthWidth in pixels when the style is line (default 1)
terminal.integrated.minimumContrastRatioAuto-adjusts text colours for readability (default 4.5)
terminal.integrated.gpuAccelerationauto (default), on, off: GPU rendering of the terminal
terminal.integrated.smoothScrollingAnimated scrolling (default false)

Copy, Paste & Mouse

Ctrl+Shift+C / Ctrl+Shift+VCopy / paste in the terminal
terminal.integrated.copyOnSelectionCopy text automatically as soon as you select it (default false)
terminal.integrated.rightClickBehaviordefault, copyPaste, paste, selectWord, nothing (copyPaste on Windows)
terminal.integrated.enableMultiLinePasteWarningWarn before pasting several lines: auto (default), always, never
terminal.integrated.wordSeparatorsCharacters that end a word on double-click (default includes spaces and brackets)
terminal.integrated.scrollbackLines of history kept per terminal (default 1000)
terminal.integrated.fastScrollSensitivityScroll speed while holding Alt (default 5)
terminal.integrated.mouseWheelScrollSensitivityScroll speed multiplier (default 1)

Sessions & Closing

terminal.integrated.enablePersistentSessionsKeep terminal sessions across window reloads (default true)
terminal.integrated.persistentSessionReviveProcessonExit (default), onExitAndWindowClose, never: restart processes in restored terminals
terminal.integrated.persistentSessionScrollbackLines of history restored with a persistent session (default 100)
terminal.integrated.confirmOnExitAsk before closing the window with terminals open: never (default), always, hasChildProcesses
terminal.integrated.confirmOnKillAsk before killing a terminal: editor (default), never, panel, always
terminal.integrated.showExitAlertShow a message when the shell exits with an error code (default true)
terminal.integrated.hideOnStartupnever (default), whenEmpty, always: hide the panel when VS Code opens

Tabs, Keys & Helpers

terminal.integrated.tabs.enabledThe terminal tab list beside the panel (default true)
terminal.integrated.tabs.locationright (default) or left
terminal.integrated.sendKeybindingsToShelltrue: send nearly all keys to the shell, not VS Code (default false)
terminal.integrated.commandsToSkipShellVS Code commands whose shortcuts still work while the terminal has focus
terminal.integrated.allowChordsAllow two-step shortcuts such as Ctrl+K Ctrl+S in the terminal (default true)
terminal.integrated.shellIntegration.enabledLets VS Code track commands and the current folder (default true)
terminal.integrated.stickyScroll.enabledPins the running command at the top while its output scrolls (default true)
terminal.integrated.initialHintThe hint shown in an empty new terminal (default true)

Automation & Alerts

terminal.integrated.autoRepliesAuto-answer a prompt, e.g. { "Terminate batch job (Y/N)": "Y\r" } (default {})
terminal.integrated.bellDurationHow long the tab shows a bell alert, in ms (default 1000)

A Reasonable Starter Set (my suggestions, not defaults)

"terminal.integrated.fontSize": 13A little smaller than the default, if you want more lines on screen
"terminal.integrated.scrollback": 10000Keeps long build and test output within reach
"terminal.integrated.copyOnSelection": trueSelect to copy, as in many Linux terminals
"terminal.integrated.cursorBlinking": trueEasier to find the cursor
"terminal.integrated.confirmOnExit": "hasChildProcesses"Only warns when something is still running
A shortcut doesn't work while the terminal has focus
The terminal passes most keys to the shell, so some VS Code shortcuts seem dead. Add the command to terminal.integrated.commandsToSkipShell to make its shortcut work there too, or set terminal.integrated.sendKeybindingsToShell to true if you want the shell to receive almost everything. Both settings only change what the terminal does with keys, not your keybindings themselves.
PowerShell says running scripts is disabled
That is a PowerShell execution-policy error, not a VS Code setting. See the Python Environments cheat sheet in this same Programming section for the one-line, current-user fix, or choose Command Prompt as the default profile instead.