MacOS VS Code Shortcuts for Easy Terminal Navigation

The Visual Studio Code Integrated Terminal is a handy, full-featured terminal emulator available right in VS Code. My typical workflow for projects often involves using VS Code and the integrated terminal in tandem.

Below is a curated list of shortcuts I am either using (or would like to remember to use!) with the VS Code Integrated Terminal on macOS. A complete list of shortcuts is available in VS Code: open the keyboard shortcuts page (Command ⌘ + Shift + P > Preferences: Open Keyboard Shortcuts) and search for "Terminal" to view or change relevant shortcuts.

Opening the Terminal

VS Code editor with an integrated terminal opened in the bottom panel

Ctrl + `Open / hide terminal panel

Terminal Groups

VS Code editor with two integrated terminals (split terminals) opened in the bottom panel

Command ⌘ + \Create a new split terminal
Ctrl+ Shift + `Create a new terminal
Command ⌘ + Shift + ]Focus next terminal group
Command ⌘ + Shift + [Focus previous terminal group
Command ⌘ + Shift + Focus next split terminal in group
Command ⌘ + Shift + Focus previous split terminal in group

For macOS, to use many of the shortcuts to move around the terminal, we need to treat the Option ( / alt) key as the meta key within VS Code. In your JSON settings for VS Code (Command ⌘ + Shift + P > Open User Settings (JSON)) add the following line:

"terminal.integrated.macOptionIsMeta": true

The Emacs shortcuts, below, work in both Zsh (which, by default, uses Emacs-bindings with zle) and Bash (which uses readline commands).


Ctrl+aBeginning of line
Ctrl+eEnd of line
Ctrl+b / Backward character
Ctrl+f / Forward character
Meta+fForward word
Meta+bBackward word


Ctrl+rReverse history search

Changing Text

Ctrl+lClear screen

Copy & Paste

Meta+dCut word after cursor
Ctrl+wCut word before cursor
Ctrl+dCut one character
Ctrl+kCut everything before cursor


Vim + Zsh users may prefer using vi-mode instead of learning the above shortcuts, while Vim + Bash users can similarly set their mode to Vim.