Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a keyboard shortkey to browse the history in a Jupyter notebook

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)

like image 845
dalanicolai Avatar asked Sep 15 '16 21:09

dalanicolai


People also ask

What are shortcut keys in Jupyter Notebook?

Shortcuts in both modes: Shift + Enter run the current cell, select below. Ctrl + Enter run selected cells. Alt + Enter run the current cell, insert below.

How do I open recent files in Jupyter Notebook?

You can open existing Jupyter Notebook files (. ipynb) in the Jupyter Notebook dashboard by clicking on the name of the file in the dashboard (e.g. filename. ipynb ).


1 Answers

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.

like image 59
mjkrause Avatar answered Nov 27 '22 14:11

mjkrause