Jupyter Notebook Edit Mode Keyboard Shortcuts




Jupyter Notebook is widely used most popular tool for machine learning and data science development.

Starting with IPython 2.0, the Jupyter Notebook has two modes:

  1. edit mode
  2. command mode.

Keyboard will behave differently depending upon which mode you have selected.

Edit mode

Green cell border is an indication of whether edit mode is enabled or not. You can switch from command mode to edit mode by pressing Enter key, turning cell border colour to green. Edit mode allows you to write code like in a normal text editor. You can also enter into edit mode by using mouse click on a cell.

Following table shows some of important shortcuts for edit mode;

Command              Description
Tab code completion or indent
Shift-Tab tooltip
Ctrl-] indent
Ctrl-[ dedent
Ctrl-A select all
Ctrl-Z undo
Ctrl-S­hift-Z redo
Ctrl-Y redo
Ctrl-Home go to cell start
Ctrl-Up go to cell start
Ctrl-End go to cell end
Ctrl-Down go to cell end
Ctrl-Left go one word left
Ctrl-Right go one word right
Ctrl-B­ack­space delete word before
Ctrl-D­elete delete word after
Esc command mode
Ctrl-M command mode
Shift-­Enter run cell, select below
Ctrl-Enter run cell
Alt-Enter run cell, insert below
Ctrl-S­hif­t-S­ubtract split cell
Ctrl-S­hift-- split cell
Ctrl-S Save and Checkpoint
Up move cursor up or previous cell
Down move cursor down or next cell
Ctrl-/ toggle comment on current or selected lines



Each data scientist must remember above shortcuts or keep a copy of them next to your computer. This will help you to increase your productivity and lower the stress while you are working on problems such as;

Need help with a business problem?

Or Need to bounce an idea?