【发布时间】:2021-09-11 05:05:48
【问题描述】:
我最近一直在为我的笔记本使用 VS Code。但是,我真的很怀念香草 Jupyter 笔记本中提供的“重新启动并运行所有”快捷方式。我在设置里找到了重启选项。
我还找到了 run-all 选项。
有没有办法可以将这两个触发器合二为一?
【问题讨论】:
标签: visual-studio-code jupyter-notebook jupyter
我最近一直在为我的笔记本使用 VS Code。但是,我真的很怀念香草 Jupyter 笔记本中提供的“重新启动并运行所有”快捷方式。我在设置里找到了重启选项。
我还找到了 run-all 选项。
有没有办法可以将这两个触发器合二为一?
【问题讨论】:
标签: visual-studio-code jupyter-notebook jupyter
有一个名为 multi-command 的 vscode 扩展程序可以让您执行此操作。转到您的扩展程序,找到扩展程序并安装它。完成此操作后,转到您的键绑定并打开 keybindings.json,您可以通过单击此处进行操作(附图片)。
然后继续添加以下内容:
{
"key": "oem_8", //put whatever key you want here
"command": "extension.multiCommand.execute",
"args": {
"sequence": [ //put whatever keybind actions you want in here
"jupyter.notebookeditor.restartkernel",
"notebook.execute"
]
},
"when": "editorTextFocus"
}
希望我能帮上忙!
【讨论】: