Creating a shortcut in vscode to switch between the terminal and editor
Overview
I spend a lot of time in vscode
swapping between the editor and terminal windows. To streamline the workflow and keep my hands from leaving the keyboard, I created the shortcut ctrl + ;
to swap between the two windows.
Details
Open the keyboard shortcuts settings:
First, search for Terminal: Focus on Terminal View
.
Change the setting by right clicking
the keyboard shortcut. Then change the Keybinding
to ctrl + ;
and change When
to !terminalFocus
:
Next, search for View: Focus Active Editor Group
.
Change the setting by right clicking
the keyboard shortcut. Then change the Keybinding
to ctrl + ;
and change When
to terminalFocus
:
Note: vscode
may not let you change the Keybinding
to the same shortcut as above. To resolve this issue, change the keybinding to ctrl + =
, then change the When
statement to terminalFocus
. Now go back and change the Keybinding
to ctrl + ;
.
Both commands will look like this when finished:
Press ctrl + ;
to toggle between the current editor window and the current terminal session.