Spyder IDE

Spyder IDE Keyboard Shortcuts

Complete Spyder IDE keyboard shortcuts. Code execution, debugging, and variable explorer shortcuts.

59
Shortcuts
6
Categories
Free
100% Free

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

Ctrl+N
New File
Create new Python file.
Ctrl+O
Open File
Open existing file.
Ctrl+S
Save
Save current file.
Ctrl+Shift+S
Save As
Save file with new name.
Ctrl+W
Close File
Close current file.
Ctrl+Z
Undo
Undo last action.
Ctrl+Y
Redo
Redo undone action.
Ctrl+X
Cut
Cut selected text.
Ctrl+C
Copy
Copy selected text.
Ctrl+V
Paste
Paste clipboard content.
Ctrl+A
Select All
Select all text.
Ctrl+F
Find
Open find dialog.
Ctrl+H
Replace
Open find and replace dialog.
Ctrl+G
Go to Line
Jump to specific line number.

Code Execution 7

F5
Run File
Run current file.
F9
Run Selection
Run selected code in console.
Ctrl+Enter
Run Cell
Run current cell.
Shift+Enter
Run Cell & Advance
Run cell and move to next.
Alt+Enter
Run Cell & Insert
Run cell and insert new cell below.
Ctrl+Shift+F5
Debug File
Run file in debug mode.
Ctrl+F5
Run Clean
Remove console variables and run file.

Debugging 8

F12
Toggle Breakpoint
Set or remove breakpoint on current line.
Ctrl+F12
Conditional Breakpoint
Set conditional breakpoint.
Ctrl+Shift+F12
Clear All Breakpoints
Remove all breakpoints.
Ctrl+F10
Start Debug
Start debugging.
Ctrl+Shift+F10
Stop Debug
Stop debugging.
Ctrl+F11
Step Over
Execute code line by line (Step Over).
Ctrl+Shift+F11
Step Into
Step into function (Step Into).
Ctrl+F12
Continue
Continue execution to next breakpoint.

Code Editing 11

Ctrl+/
Toggle Comment
Comment or uncomment selected lines.
Tab
Indent
Indent selected lines.
Shift+Tab
Unindent
Unindent selected lines.
Ctrl+]
Indent
Indent code.
Ctrl+[
Unindent
Unindent code.
Ctrl+D
Delete Line
Delete current line.
Ctrl+Shift+D
Duplicate Line
Duplicate current line.
Ctrl+L
Select Line
Select entire current line.
Ctrl+Shift+Up/Down
Move Line
Move current line up/down.
Ctrl+Space
Auto-complete
Open code completion.
Ctrl+I
Inspect Object
Show object information.

Panels & Views 12

Ctrl+Shift+E
Editor
Focus editor panel.
Ctrl+Shift+I
IPython Console
Focus IPython console.
Ctrl+Shift+V
Variable Explorer
Open variable explorer.
Ctrl+Shift+F
File Explorer
Open file explorer.
Ctrl+Shift+H
Help
Open help panel.
Ctrl+Shift+P
Plots
Open plots panel.
Ctrl+Shift+C
History
Open command history.
Ctrl+Shift+X
Close All Files
Close all open files.
Ctrl+Tab
Next Tab
Switch to next editor tab.
Ctrl+Shift+Tab
Previous Tab
Switch to previous editor tab.
Ctrl+F4
Close Tab
Close current tab.
F11
Full Screen
Toggle fullscreen mode.

Search & Navigation 7

Ctrl+P
File Search
Search for files in project.
Ctrl+Shift+P
Symbol Search
Search for symbols in current file.
Ctrl+G
Go to Line
Jump to specific line.
Ctrl+Alt+Left
Go Back
Navigate to previous location.
Ctrl+Alt+Right
Go Forward
Navigate to next location.
F3
Find Next
Go to next search result.
Shift+F3
Find Previous
Go to previous search result.
📜 Source: Spyder documentation — default keyboard shortcuts (Preferences › Keyboard shortcuts). Spyder 5/6 default keymap as shown in the IDE's Keyboard shortcuts preferences and the Spyder docs; macOS uses Cmd. Checked 2026-09-05. How we verify ›
📄 View Printable Cheat Sheet — Download as PDF or print

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.

No shortcuts found
Copied!
🔧 Spotted an error or a missing shortcut? Suggest an edit on GitHub — every accepted fix goes live on this page, the API and the CLI.

🤖 Ask AI about Spyder IDE shortcuts

Open your assistant with this page preloaded as the source — great for follow-up questions like "which of these work in other apps?"

ChatGPT Claude Perplexity Gemini Grok