是否有键盘快捷键来浏览 Jupyter 笔记本中的历史记录 [英] Is there a keyboard shortkey to browse the history in a Jupyter notebook

查看:58
本文介绍了是否有键盘快捷键来浏览 Jupyter 笔记本中的历史记录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有一种简单的方法可以浏览命令历史记录并在 Jupyter 笔记本中重用旧命令?一些等效于 iPython 控制台中使用的向上/向下箭头或 Mathematica 中使用的 % 符号.(虽然答案对于专家来说可能看起来微不足道,但对于新手来说确实很难找到)

Is there an easy way to browse through command history and reuse old commands in a Jupyter notebook? Some equivalent to either the arrow up/down use in the iPython console or to the % sign use in Mathematica. (Although the answer might seem trivial to an expert, it is really hard to find for a newbie)

推荐答案

我也在寻找相同的解决方案.但一年后,经过大约 10 分钟的搜索,我找到了最好的(link) 是这个神奇的命令:%recall last%recall ,执行后复制从历史命令到一个新的单元格.可能与您一直在寻找的不太一样 - 与向上/向下箭头相比有点太笨拙了.但对于包含大量文本的单元格来说,这是一个不错的选择.

I was looking for the same. But a year later, and after about 10 min of scouring the best I found (link) is this magic command: %recall last or %recall <integer>, which after execution copies a command from history into a new cell. Probably not quite what you had been looking - a tad too kludgy compared to arrow up/down. But a good option for cells with lots of text.

这篇关于是否有键盘快捷键来浏览 Jupyter 笔记本中的历史记录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆