如何让 ctrl+enter 运行 VS Code 中 Jupyter Notebook 中的当前单元格?

Sam*_*ish 3 python jupyter visual-studio-code

在 vscode 中,我想通过“ctrl+enter”运行当前单元格,但编辑器行为是“enter”(插入新行)而不是“运行此单元格”。

“shift+enter”正在工作,但我不想创建一个新单元格。

“ctrl+alt+enter”会弹出错误消息:command 'jupyter.runSelectionLine' not found

有什么建议可以让“ctrl+enter”可以运行当前单元格吗?我希望它能像 colab 一样工作。

小智 6

也不适合我。但在我安装了“Jupyter Keymap”扩展后它开始工作。

这应该会有帮助https://marketplace.visualstudio.com/items?itemName=ms-toolsai.jupyter-keymap