7

I would like to be able to switch between terminal panes in VSCode using a keyboard shortcut. I am on a Mac.

I have opened keyboard shortcuts (Commandkey+K, Commandkey+S) and found the workbench.action.terminal.focusNextPane setting:
enter image description here

where it states quite clearly what the keyboard shortcut should be (option+command+downarrow or option+command+leftarrow) but neither of those work. They DO work when focus is in the editor and I want to switch between panes there, but not working when the focus in the terminal.

Not sure what I'm doing wrong but I hope I'm missing something obvious. Can anyone explain?

2
  • 1
    Are your terminals split or are they just two different terminals? The commands you are trying to use are just for moving between split terminal panes - not to go to the next terminal. That command is workbench.action.terminal.focusNext and is not bound to a keybinding by default. Commented May 5, 2020 at 21:20
  • aha, brilliant, thank you, I WAS missing something obvious. workbench.action.terminal.focusNext was the correct one and I followed the suggested keybinding here: github.com/microsoft/vscode/issues/37937#issuecomment-343231679, making sure to set the when expression to terminalFocus. If you write your comment as an answer I shall accept it as such. thank you. Commented May 5, 2020 at 21:27

1 Answer 1

5

The commands you are looking at (Terminal: Focus Next Pane and Terminal: Focus Previous Pane) are to switch between split terminal panes.

The commands to switch between terminals are:

Terminal: Focus Next Terminal workbench.action.terminal.focusNext Terminal: Focus Previous Terminal workbench.action.terminal.focusPrevious 

both of which are unbound by default.

Sign up to request clarification or add additional context in comments.

1 Comment

thanks. I bound them to cmd+shift+j, cmd+shift+k as suggested here: github.com/microsoft/vscode/issues/37937#issuecomment-343231679

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.