Spyder is the scientific Python IDE that ships with Anaconda, and its keymap is built around one idea: run code in pieces — a cell, a selection, a file — into a persistent IPython console where the variables stay alive. The shortcuts that matter are the run keys and the panel toggles; the editing keys are ordinary. The table is the Windows/Linux default; macOS uses Cmd.
File & Editing 14
Code Execution 7
Debugging 8
Code Editing 11
Panels & Views 12
Search & Navigation 7
Running code in pieces
F5 runs the whole file in the console and F9 runs only the selected lines (or the current line with nothing selected), which is how you test one statement without re-running a slow import. Cells are blocks separated by # %% comments: Ctrl + Enter runs the current cell and stays, Shift + Enter runs it and moves to the next — the Jupyter habit — and Alt + Enter runs it and inserts a new cell below. Ctrl + F5 runs the file in a fresh namespace so leftover variables cannot mask a bug.
Debugging and inspection
A breakpoint on the current line toggles with F12, and Ctrl + Shift + F5 starts the file under the debugger, stopping at the first one; Ctrl + F10 starts debugging from the console, Ctrl + F11 steps over and Ctrl + Shift + F11 steps into. Ctrl + I with the cursor on a name opens its documentation in the Help pane, which is the quickest way to read a NumPy or pandas signature without leaving the editor. Ctrl + Shift + V raises the Variable Explorer, where DataFrames and arrays can be opened in a grid.
Panels and files
Each pane has a Ctrl + Shift shortcut: Ctrl + Shift + E editor, Ctrl + Shift + I IPython console, Ctrl + Shift + P plots, Ctrl + Shift + H help and Ctrl + Shift + F the file explorer. Ctrl + P opens a file by fuzzy name and Ctrl + G goes to a line. Ctrl + D deletes the current line rather than duplicating it — Ctrl + Shift + D duplicates — and Ctrl + Shift + Up/Down moves lines. F11 is full screen for a laptop.
Frequently asked questions
What is the difference between F5 and F9?
F5 runs the whole file. F9 runs only the selected text, or the current line if nothing is selected, into the same console.
How do I define a cell?
Insert a comment line starting with # %% in the editor. Everything between two such lines is a cell for Ctrl + Enter and Shift + Enter.
Why does Ctrl + F12 appear twice in the table?
Spyder's default keymap binds it in different contexts: it sets a conditional breakpoint in the editor and continues execution while the debugger is active.
How do I look up a function's documentation?
Put the cursor on the name and press Ctrl + I. The Help pane shows the docstring, rendered when possible.