PyCharm Cheatsheet
#
PyCharm is an Integrated Development Environment (IDE) used for Python development. It offers powerful tools for coding, debugging, and project management.
Basic Navigation
#
Command/Option | Example | Description |
---|
Ctrl + E | Ctrl + E | View recent files |
Ctrl + Shift + A | Ctrl + Shift + A | Find and run commands |
Ctrl + N | Ctrl + N | Navigate to class |
Ctrl + Shift + N | Ctrl + Shift + N | Navigate to file |
Alt + F7 | Alt + F7 | Find usages of symbol |
Ctrl + F12 | Ctrl + F12 | Show file structure |
Editing Code
#
Command/Option | Example | Description |
---|
Ctrl + C | Ctrl + C | Copy selected text |
Ctrl + X | Ctrl + X | Cut selected text |
Ctrl + V | Ctrl + V | Paste text |
Ctrl + Z | Ctrl + Z | Undo |
Ctrl + Shift + Z | Ctrl + Shift + Z | Redo |
Ctrl + D | Ctrl + D | Duplicate current line |
Ctrl + Y | Ctrl + Y | Delete current line |
Ctrl + / | Ctrl + / | Toggle line comment |
Ctrl + Shift + / | Ctrl + Shift + / | Toggle block comment |
Searching and Replacing
#
Command/Option | Example | Description |
---|
Ctrl + F | Ctrl + F search_term | Find text in the file |
Ctrl + R | Ctrl + R old_text | Replace text in the file |
Ctrl + Shift + F | Ctrl + Shift + F | Find text in the project |
Ctrl + Shift + R | Ctrl + Shift + R | Replace text in the project |
File Management
#
Command/Option | Example | Description |
---|
Ctrl + N | Ctrl + N | New file |
Ctrl + S | Ctrl + S | Save file |
Ctrl + Shift + S | Ctrl + Shift + S | Save all files |
Ctrl + W | Ctrl + W | Close current file |
Ctrl + Shift + T | Ctrl + Shift + T | Reopen closed file |
Alt + Insert | Alt + Insert | Generate code (e.g., getters, setters) |
Integrated Terminal
#
Command/Option | Example | Description |
---|
Alt + F12 | Alt + F12 | Open/close terminal |
Ctrl + Shift + F12 | Ctrl + Shift + F12 | Toggle maximized editor and tool windows |
Ctrl + Shift + V | Ctrl + Shift + V | Paste from history |
Debugging
#
Command/Option | Example | Description |
---|
Shift + F9 | Shift + F9 | Start debugging |
F8 | F8 | Step over |
F7 | F7 | Step into |
Shift + F8 | Shift + F8 | Step out |
Ctrl + F8 | Ctrl + F8 | Toggle breakpoint |
Ctrl + Shift + F8 | Ctrl + Shift + F8 | View breakpoints |
Project Management
#
Command/Option | Example | Description |
---|
Ctrl + Alt + Shift + S | Ctrl + Alt + Shift + S | Open Project Structure dialog |
Ctrl + Alt + F7 | Ctrl + Alt + F7 | Show usages in the project |
Alt + 1 | Alt + 1 | Toggle project view |
Miscellaneous
#
Command/Option | Example | Description |
---|
Ctrl + Shift + A | Ctrl + Shift + A | Find action |
Ctrl + Alt + L | Ctrl + Alt + L | Reformat code |
Ctrl + Shift + F10 | Ctrl + Shift + F10 | Run context configuration |
Ctrl + Shift + E | Ctrl + Shift + E | View recent files |
This cheatsheet covers the essential PyCharm commands and options to help you navigate, edit, and manage your code efficiently in PyCharm.