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

查看:360
本文介绍了是否有键盘快捷键可在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分钟的筛选,我发现了最好的(

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天全站免登陆