Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to switch between terminals in Visual Studio Code?

I'm looking to switch between terminals open in visual studio code.

With this "Switch focus between editor and integrated terminal in Visual Studio Code" question I correctly setup the focus, but I would like to switch between terminals, not only from code to terminal.

Is there a way to do it?

like image 286
baldarn Avatar asked Jan 25 '18 10:01

baldarn


People also ask

What is the shortcut to switch to terminal in Vscode?

Now you can use CTRL + SHIFT + p followed by ENTER to toggle between terminal and the text editor as long as that command is the last used in the command palette.


2 Answers

Go to FilePreferencesKeyboard Shortcuts or just press Ctrl + k + Ctrl + s.

Then click the icon in upper right corner, it opens keybindings.json file:

Visual Guide

Try adding the following two entries to this file:

{     "key": "ctrl+pagedown",     "command": "workbench.action.terminal.focusNext",     "when": "terminalFocus" }, {     "key": "ctrl+pageup",     "command": "workbench.action.terminal.focusPrevious",     "when": "terminalFocus" } 

Note: On Mac change ctrl to cmd

like image 95
Serhii Popov Avatar answered Oct 12 '22 14:10

Serhii Popov


Looking deeply I found it:

{   "key": "shift+cmd+]",   "command": "workbench.action.terminal.focusNext",   "when": "terminalFocus" } 

:)

like image 40
baldarn Avatar answered Oct 12 '22 15:10

baldarn