RubyMine cheat sheet

94 shortcuts in 12 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

10 shortcuts
  • ^⌥I
    Auto-indent line(s)
  • ^SPACE
    Basic code completion
  • ^⇧?
    Comment/uncomment with block comment
  • ^/
    Comment/uncomment with line comment
  • ^C
    Copy current line or selected block to buffer
  • ^X
    Cut current line or selected block to buffer
  • ^⇧W
    Decrease current selection to previous state
  • ^Y
    Delete line at caret
  • ^BACKSPACE
    Delete to word start
  • ^D
    Duplicate current line or selected block

Editing II

11 shortcuts
  • TAB
    Indent selected lines
  • ^O
    Override methods
  • ^V
    Paste from buffer
  • ^⇧V
    Paste from recent buffers...
  • ^Q
    Quick documentation lookup
  • ^⌥L
    Reformat code
  • ^W
    Select successively increasing code blocks
  • ^⇧}
    Select till code block end
  • ^⇧{
    Select till code block start
  • ⌥↵
    Show intention actions/quick-fixes
  • ⇧↵
    Start new line

Editing III

10 shortcuts
  • ^⌥T
    Surround with (begin...end, if...then...end, etc.)
  • ^⌥U
    Toggle Camel/Snake Case
  • ^⇧U
    Toggle case for word at caret or selected block
  • ⇧TAB
    Unindent selected lines
  • ⌥⇧F10
    Open run configurations dropdown
  • ⌥⇧F9
    Open debug configurations dropdown
  • ⇧F10
    Run
  • ⇧F9
    Debug
  • ^⇧F10
    Run context configuration from editor
  • ^⌥R
    Run Rake task

Navigation

9 shortcuts
  • ^N
    Go to class
  • ⌥LEFT
    Go to previous editor tab
  • ^⇧N
    Go to file
  • ^⌥⇧N
    Go to symbol
  • ⌥RIGHT
    Go to next editor tab
  • ^G
    Go to line
  • ^⌥LEFT
    Navigate back
  • ^E
    Recent files popup
  • ^⌥RIGHT
    Navigate forward

Navigation II

6 shortcuts
  • ^⇧BACKSPACE
    Navigate to last edit location
  • ⌥F1
    Select current file or symbol in any view
  • ^⇧L
    Open quick definition lookup
  • ^]
    Move to code block end
  • ^[
    Go to code block start
  • ^F12
    File structure popup

Navigation III

8 shortcuts
  • ^H
    Type hierarchy
  • F2
    Next highlighted error
  • ⇧F2
    Previous highlighted error
  • F4
    View source
  • ⌥HOME
    Show navigation bar
  • ^F11
    Toggle book mark with mnemonic
  • ^3
    Go to bookmark numbered 3
  • ^9
    Go to book mark numbered 9

Run

6 shortcuts
  • ⌥⇧F10
    Open run configurations dropdown
  • ⌥⇧F9
    Open debug configurations dropdown
  • ⇧F10
    Run
  • ⇧F9
    Debug
  • ^⇧F10
    Run context configuration from editor
  • ^⌥R
    Run Rake task

Rails

8 shortcuts
  • ⌥⇧N
    Navigate to Rails model/view/controller etc.
  • ⌥F2
    Preview Rails View in browser
  • ^⇧↵
    Complete statement (only in RHTML)
  • ^⇧>
    Insert <%= %> (only in RHTML)
  • ^⌥D
    Model Dependency Diagram
  • ^R
    Reload applications sources -only in Rails Console
  • ^⇧Y
    'Ruby/Rails' quick list
  • ^⌥G
    Run Rails generator

Debugging

6 shortcuts
  • F8
    Step over
  • F7
    Step into
  • ⇧F8
    Step out
  • ⌥F9
    Run to cursor
  • ⌥F8
    Evaluate expression
  • F9
    Resume program

Refactoring

9 shortcuts
  • F5
    Copy refactor (only for files)
  • ^⌥M
    Extract Method
  • ^⌥F
    Introduce field
  • ⇧F6
    Rename
  • F6
    Move refactor (only for files)
  • ^⌥C
    Introduce constant
  • ^⌥N
    Inline
  • ^⌥⇧T
    'Refactor this...' quick list
  • ^⌥V
    Introduce variable

Search / Replace

8 shortcuts
  • ^F
    Find
  • F3
    Find next
  • ⇧F3
    Find previous
  • ^R
    Replace
  • ^⇧F
    Find in path
  • ^⇧R
    Replace in path
  • ⌥F7
    Find usages
  • ^⌥F7
    Show usages

Misc

3 shortcuts
  • ^D
    View diff
  • ⌥`
    VCS operations popup
  • ^J
    Insert live template