Shortcuts for Jupyter Notebook

Silly me, only to know that Jupyter has shortcut keys like vim. . .
The best way to learn is in middle school. . .
These are some common shortcut keys I collected from the Internet, some of which are not applicable to Mac keyboards, but slowly explore~

Shortcuts for Jupyter Notebook

Jupyter Notebook has two keyboard input modes. Edit mode, which allows you to type code or text into the cell; the cell outline is green. In command mode, the keyboard inputs the command to run the program; the unit frame line is gray at this time.

Command mode (press Esc to open)

  • Enter : enter edit mode
  • Shift-Enter : run this unit, select the next unit
  • Ctrl-Enter : run this unit
  • Alt-Enter : run this cell, insert new cell under it
  • Y : Unit goes to code state
  • M : The unit goes to markdown state
  • R : the unit goes to the raw state
  • 1 : Set level 1 title
  • 2 : Set level 2 title
  • 3 : Set level 3 title
  • 4 : Set level 4 title
  • v5 : set level 5 title
  • 6 : Set level 6 heading
  • Up : select the upper unit
  • K : select the upper cell
  • Down : select the lower cell
  • J : Select the lower unit
  • Shift-K : Expand the selected cell above
  • Shift-J : Expand the selected cell below
  • A : Insert new cell above
  • B : Insert new cell below
  • X : Cut the selected cell
  • C : Copy selected cells
  • Shift-V : Paste to cell above
  • V : Paste to the cell below
  • Z : restore the last unit deleted
  • D,D : delete the selected cell
  • Shift-M : Merge selected cells
  • Ctrl-S : save file to disk
  • S : file save
  • L : convert line number
  • O : Convert output
  • Shift-O : Shift output scroll
  • Esc : close the page
  • Q : close the page
  • H : Show shortcut help
  • I,I : Interrupt Notebook Kernel
  • 0,0 : restart the notebook kernel
  • Shift : ignore
  • Shift-Space : scroll up
  • Space : scroll down

    Edit mode (Enter key to start)

  • Tab : code completion or indentation
  • Shift-Tab : hint
  • Ctrl-] : indent
  • Ctrl-[ : unindent
  • Ctrl-A : select all
  • Ctrl-Z : Undo
  • Ctrl-Shift-Z : do it again
  • Ctrl-Y : do it again
  • Ctrl-Home : jump to the beginning of the cell
  • Ctrl-Up : jump to the beginning of the cell
  • Ctrl-End : jump to the end of the cell
  • Ctrl-Down : Jump to the end of the cell
  • Ctrl-Left : jump to the left one initial
  • Ctrl-Right : jump to the right one prefix
  • Ctrl-Backspace : delete the previous word
  • Ctrl-Delete : delete the next word
  • Esc : enter command mode
  • Ctrl-M : enter command mode
  • Shift-Enter : run this unit, select the next unit
  • Ctrl-Enter : run this unit
  • Alt-Enter : run this unit, insert a unit below
  • Ctrl-Shift-- : Split cell
  • Ctrl-Shift-Subtract : Subtract cells
  • Ctrl-S : save file to disk
  • Shift : ignore
  • Up : Move the cursor up or go to the previous unit
  • Down : Move the cursor down or go to the next unit

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325478418&siteId=291194637