Home > Mobile >  how to switch between terminal tabs in VS CODE?
how to switch between terminal tabs in VS CODE?

Time:01-15

I want to create keyboard shortcut in order to switch between tabs in the terminal window. I tried writing new lines in the json file , but it does not seem to work. I added a picture to explain my self. In the picture there 2 tabs in the terminal the right is green and the right is red . I want to create a shortcut that will switch between the 2 terminal tabs ,just as I did with editor tabs .

terminal pic with 2 tabs in it:

I tried adding this lines of code to the json file :

    {
        "key": "ctrl f2",
        "command": "workbench.action.terminal.nextTab",
        "when": "terminalFocus"
    },
    {
        "key": "ctrl f1",
        "command": "workbench.action.terminal.prevTab",
        "when": "terminalFocus"
    },

but it seems it does not work. edit: I use windows.

CodePudding user response:

You can switch between the two in the picture with alt rightArrow and alt leftArrow. (UpArrow and DownArrow also work)

CodePudding user response:

For Windows, to switch terminal you just do ctrl ~

and to switch back to code editor ctrl 1

CodePudding user response:

Seems like you could you use alt down, alt right to switch to the next pane and alt up, alt left to switch to the previous one:

{
  "key": "alt down",
  "command": "workbench.action.terminal.focusNextPane",
  "when": "terminalFocus && terminalHasBeenCreated || terminalFocus && terminalProcessSupported"
},
{
  "key": "alt right",
  "command": "workbench.action.terminal.focusNextPane",
  "when": "terminalFocus && terminalHasBeenCreated || terminalFocus && terminalProcessSupported"
},
{
  "key": "alt up",
  "command": "workbench.action.terminal.focusPreviousPane",
  "when": "terminalFocus && terminalHasBeenCreated || terminalFocus && terminalProcessSupported"
},
{
  "key": "alt left",
  "command": "workbench.action.terminal.focusPreviousPane",
  "when": "terminalFocus && terminalHasBeenCreated || terminalFocus && terminalProcessSupported"
}
  • Related