Alex E
Alex E

Reputation: 307

Hotkey in vs code to switch between python interactive window and active editor?

Is there a hotkey ( or a command you can assign one to ) in vs code to switch the cursor between a python interactive window and an active editor widnow?

Upvotes: 9

Views: 2765

Answers (3)

Gregor
Gregor

Reputation: 388

The way the run code to interactive was somehow not specified correctly in jupyter v.2021.10.11....

I added the following to the user defined keyboard shortcuts

[{
    "key": "ctrl+;",
    "command": "jupyter.execSelectionInteractive",
    "when": "editorTextFocus && !findInputFocussed && !jupyter.ownsSelection && !notebookEditorFocused && !replaceInputFocussed && editorLangId == 'python'"
  }]

so now "control" + ";" runs it in interactive without changing other short cuts.

Upvotes: 0

pkot
pkot

Reputation: 41

Unfortunately there is no way to switch between those without issues as of now, check these issues: https://github.com/microsoft/vscode/issues/97992 https://github.com/microsoft/vscode-python/pull/12066

Upvotes: 4

R Chiodo
R Chiodo

Reputation: 554

CTRL+1 and CTRL+2 will switch between groups. So if you have the interactive window in one group and your code in another, you can uses these shortcuts to switch between them.

Upvotes: 9

Related Questions