PyCharm cheat sheet

92 shortcuts in 9 lessons

Reading a list won't make them stick. ShortcutFoo has you type each shortcut, then brings it back just before you'd forget it.

Editing I

10 shortcuts
  • ^SPACE
    Basic code completion
  • ⌘⇧↵
    Complete statement
  • ⌘/
    Comment line
  • ⌘⌥/
    Block comment
  • ⌥DOWN
    Decrease current selection to previous state
  • ^⇧Q
    Context info
  • ^⌥L
    Auto-indent line(s)
  • ⌘BACKSPACE
    Delete line at caret
  • ⌥DEL
    Delete to word end
  • ⌥BACKSPACE
    Delete to word start

Editing II

9 shortcuts
  • ^J
    Quick documentation lookup
  • ^↵
    Generate code...
  • ^O
    Override methods
  • ^I
    Implement methods
  • ⌥UP
    Select successively increasing code blocks
  • ⌘⌥L
    Reformat code
  • TAB
    Indent selected lines
  • ⌘⇧V
    Paste from recent buffers
  • ⌘D
    Duplicate current line or selected block

Editing III

7 shortcuts
  • ⌘⌥T
    Surround with...
  • ⌥↵
    Show intention actions and quick-fixes
  • ⇧TAB
    Unindent selected lines
  • ^⇧J
    Smart line join
  • ⌘↵
    Smart line split
  • ⇧↵
    Start new line
  • ⌘⇧U
    Toggle case for word at caret or selected block

General

15 shortcuts
  • F5
    Copy (refactoring)
  • F6
    Move (refactoring)
  • ⌘DEL
    Safe delete
  • ⇧F6
    Rename
  • ⌘⌥M
    Extract method
  • ⌘⌥V
    Introduce variable
  • ⌘⌥F
    Introduce field
  • ⌘⌥C
    Indroduce constant
  • ^V
    'VCS' quick popup
  • ⌘K
    Commit project to VCS
  • ⌥⇧C
    View recent changes (VCS)
  • ⌘⌥F11
    Toggle full screen mode
  • ⌘⇧F12
    Toggle maximizing editor
  • ⌥⇧F
    Add to favorites
  • ⌥⇧I
    Inspect current file with current profile

Navigation I

8 shortcuts
  • ⌘O
    Go to class
  • ESC
    Go to editor (from tool window)
  • ⌘⇧F4
    Close active run/messages/find/... tab
  • ⌘F12
    File structure popup
  • ^⌥H
    Call hierarchy
  • F4
    Editor source
  • ^2
    Go to bookmark #2
  • ^8
    Go to bookmark #8

Navigation II

5 shortcuts
  • ⌘⇧O
    Go to file
  • ⌘⌥O
    Go to symbol
  • ⌘L
    Go to line
  • ⌘⌥B
    Go to implementation(s)
  • ^⇧B
    Go to type declaration

Navigation III

14 shortcuts
  • ⇧ESC
    Hide active or last active window
  • ⌘E
    Recent files popup
  • ⌘⇧BACKSPACE
    Navigate to last edit location
  • ⌥F1
    Select current file or symbol in any view
  • ⌘Y
    Open quick definition lookup
  • ⌘]
    Move to code block end
  • ⌘[
    Move to code block start
  • F2
    Next highlighted error
  • ⇧F2
    Previous highlighted error
  • ⌘DOWN
    View source
  • ⌥HOME
    Show navigation bar
  • F3
    Toggle bookmark
  • ⌥F3
    Toggle bookmark with mnemonic
  • ⌘F3
    Show bookmarks

Running / Debugging

14 shortcuts
  • ^⌥R
    Select configuration and run
  • ^⌥D
    Select configuration and debug
  • ^R
    Run
  • ^D
    Debug
  • ^⇧R
    Run context configuration from editor
  • ⌘⇧X
    Run command line
  • F8
    Step over
  • F7
    Step into
  • ⇧F7
    Smart step into
  • ⌥F9
    Run to cursor
  • ⌥F8
    Evaluate expression
  • ⌘⌥R
    Resume program
  • ⌘F8
    Toggle breakpoint
  • ⌘⇧F8
    View breakpoints

Search / Replace

10 shortcuts
  • ⌘F
    Find
  • ⌘G
    Find next
  • ⌘⇧G
    Find previous
  • ⌘R
    Replace
  • ⌘⇧F
    Find in path
  • ⌘⇧R
    Replace in path
  • ⌥F7
    Find usages
  • ⌘F7
    Find usages in file
  • ⌘⇧F7
    Highlight usages in file
  • ⌘⌥F7
    Show usages