Notebook Editing and Dashboard
Beyond running cells, editing a notebook means managing its structure: moving, splitting, merging, and cleaning cells; keeping the document tidy; and using the interface dashboard features that make large notebooks navigable.
Split and Merge Cells
- Split: place the cursor where the new cell should start, then Ctrl+Shift+- (command mode: the split action).
- Merge: select multiple cells (shift+arrows in command mode) and press Shift+M to merge them into one.
- Move: in command mode, shift+up/shift+down reorders cells.
Cleaning Up
- 0 (command mode) - clear a cell's output.
- Edit -> Clear All Outputs - strip every output for a lean shared file.
- Edit -> Delete All Checkpoints - remove saved recovery versions.
- Restart the kernel before sharing so execution counts are consistent.
Navigating Large Notebooks
- Use Markdown headings and the rendered outline to jump between sections.
- Find (Ctrl+F) searches cell contents across the whole notebook.
- The command palette (Ctrl+Shift+C) is a searchable index of all actions, including "Go to cell" by number.
- Keep a "Table of Contents" Markdown cell at the top with anchor links to each section.
Working with Version Control
.ipynb files are JSON and merge badly in git. Common approaches:
- jupyter nbconvert --to notebook --inplace with --ClearOutput to normalize before committing.
- jupytext: keep the notebook as a .py or .md twin that diffs cleanly.
- .gitignore generated outputs; commit the notebook with outputs cleared and run it in CI instead.
Summary
Edit notebooks with the cell operations (split, Shift+M merge, shift+arrows reorder), keep files clean (clear outputs, restart kernels) before sharing, navigate large notebooks with headings, search, and the command palette, and version-control .ipynb files with nbconvert normalization or jupytext twins to avoid merge pain.