Jupyter Notebook 中是否有键盘快捷键可以开始在新创建的单元格中输入内容?

发布于 2025-01-13 20:18:33 字数 337 浏览 2 评论 0原文

我假设有一个键盘快捷键可以在新创建的 Jupyter Notebook 单元格中开始输入,但我将问题命名为是否它是否存在,以便不建立任何假设。如果确实存在,请在您的答案中包含要使用的快捷方式。

我将尽力提供尽可能多的相关信息,以帮助回答我的问题: 我从他们的网站(不使用 Anaconda)在我的 Windows 10 PC 上安装了 Jupyter Notebook。我在 Google Chrome 浏览器中查看和编辑 Jupyter Notebook 文件。使用 Ctrl+Enter 运行单元格后,我按 b 在下面创建一个新单元格。我想立即开始在该单元格内输入内容,而无需使用鼠标在该单元格内单击。 谢谢

I assumed that there would be a keyboard shortcut to begin typing within a newly created Jupyter Notebook cell, but I titled my question asking if it even exists to not build any assumptions. If it does exist, please also include in your answer the shortcut to use.

I will try to provide as much relevant information as possible that will help in answering my question:
I installed Jupyter Notebook on my Windows 10 PC from their website (not using Anaconda). I view and edit Jupyter Notebook files in my Google Chrome browser. After running a cell with Ctrl+Enter, I press b to create a new cell below. I would like to immediately begin typing within that cell without having to click inside that cell with a mouse.
Thank you

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

浅笑依然 2025-01-20 20:18:33

有一个内置的快捷方式可以完全满足您的需求。只需输入一个单元格并按 Alt + Enter 即可。这将执行当前选定的单元格,在其下方插入一个新单元格并进入编辑模式。

请注意,如果您未处于编辑模式,这也适用。

输入图片此处描述

我的设置与您的稍有不同。这是一个参考。

输入图片此处描述

There is a builtin-shortcut that does exactly what you want. Just enter a cell an press Alt + Enter. This will execute the current selected cell, insert a new cell below it and enter edit mode.

Notice, that this also works if you are not in edit mode.

enter image description here

My setup is a little bit different than yours. Here is a reference.

enter image description here

内心旳酸楚 2025-01-20 20:18:33

如果您只按 Enter 键,它将在当前选定的单元格中启动编辑模式。因此,如果您执行 Alt + Enter 来运行单元格并在下面创建一个新单元格,只需再次按 Enter 键,您就可以开始在单元格中输入内容。

编辑:我还刚刚发现,如果您在选择单元格但未处于编辑模式时按“h”,则会弹出一个包含所有键盘快捷键的窗口。

If you press just Enter it will start editing mode in the currently selected cell. So if you do the Alt + Enter to run a cell and create a new cell below, just press Enter again and you will be able to start typing in the cell.

Edit: I also just discovered that if you press 'h' when you have a cell selected but not in edit mode, it brings up a window with all the keyboard shortcuts.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文