Reputation: 307
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
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
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
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