我刚开始使用 ipython/jupyter notebook。 Shift-Enter(运行当前单元格)和 Enter(插入换行符)命令使用起来令人沮丧。我想在编辑模式下交换这两个输入的命令。
所以:
Shift-Enter:(插入换行符)
输入:(运行当前单元格)
有什么方法可以为 jupyter notebook 重新映射命令?也许是配置文件?听起来 ipython notebook 并不总是以这种方式工作( Enter in the IPython console inserts new line instead of executing current line after kernel restart #2696 )。链接的 github 问题的解决方案似乎是“只需使用 shift-enter”,而我无法在 google 上找到解决方案。
我有以下版本:
ipykernel (4.5.2)
ipython (5.3.0)
jupyter (1.0.0)
notebook (4.4.1)
最佳答案
打开笔记本,在【帮助】下可以找到【编辑键盘快捷键】。对于 5.0 之前的版本,我在下面链接的文档详细说明了可以运行哪些命令来更改快捷方式。
来源:https://jupyter-notebook.readthedocs.io/en/stable/examples/Notebook/Custom%20Keyboard%20Shortcuts.html
关于ipython - 有什么方法可以在编辑模式、Jupyter Notebook 中交换 Enter 和 Shift-Enter 输入命令?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42778349/