Jupyter Notebook has two primary modes: command mode and edit mode.
Command mode allows you to navigate and manipulate cells at a higher level.
Below are some useful keyboard shortcuts in command mode:
- A: Insert a new cell above the current cell
- B: Insert a new cell below the current cell
- D, D: Delete the current cell
- Z: Undo the last cell operation
- Shift + Enter: Run the current cell and move to the next one
- Y: Change the current cell to a code cell
- M: Change the current cell to a markdown cell
- S: Save the notebook
Edit mode allows you to edit a cell when you click inside of it.
Below are useful keyboard shortcuts in edit mode:
- Ctrl + Enter: Run the current cell
- Esc: Exit edit mode and enter command mode
- Shift + Tab: Show the docstring of the current object
- Tab: Auto-complete code or show available options
- Ctrl + /: Comment or uncomment a line of code