3

In the Unix shell, you press up-arrow to recall previous command. With Jupyter, so far I could only hack to achieve this behaviour with copy-and-paste through C and Shift-V shortcut, or go into previous cell and run it again, which is cumbersome.

Is there a standard shortcut for this?

kakyo
  • 10,460
  • 14
  • 76
  • 140

1 Answers1

2

I don't think there are any shortcuts for copying contents of any old cell and pasting in another, nor am I able to find a reason not to reuse the cell itself than just the code in it. Some useful shortcuts are:

⌘/Ctrl+M P: Previous cell

⌘/Ctrl+Shift+G: Global find previous

These ca be found in preferences. You can also set shortcut for 'Copy to scratch cell' which is not set by default (at least for me).

EDIT

Just found this:

https://stackoverflow.com/a/50315384/10689064

shoonya ek
  • 317
  • 1
  • 2
  • 12
  • Thanks. On mac with py3.7 homebrew, I can't get your commands to work, but I found the moderator's link helpful. `%recall` workds though still not ideal. – kakyo Dec 11 '18 at 02:15