Skip to content

Instantly share code, notes, and snippets.

@percyvega
Last active October 6, 2021 01:45
Show Gist options
  • Save percyvega/cea43d75dbc267e9eddbfadf6fe25a4c to your computer and use it in GitHub Desktop.
Save percyvega/cea43d75dbc267e9eddbfadf6fe25a4c to your computer and use it in GitHub Desktop.

Legend

  • Shift: ⇧
  • Control: ⌃
  • Alt/Option: ⌥
  • Command: ⌘
  • Enter/Return: ⏎
  • Right arrow: →
  • Left arrow: ←
  • Up arrow: ↑
  • Down arrow: ↓

Execution

  • Run program: ⌃ R
  • Debug program: ⌃ D
  • Stop JVM: ⌘ F2

Debugging

  • Step over / into: F8 / F7
  • Smart step into / Step out Run to cursor: ⇧ F7 / ⇧ F8
  • Run to cursor: ⌥ F9
  • Evaluate expression: ⌥ F8
  • Resume program: ⌘ ⌥ R

Bookmarks

  • Toggle bookmark: F3
  • Toggle bookmark with mnemonic: ⌥ F13
  • Go to numbered bookmark: ⌃0...⌃9
  • Show bookmarks: ⌘ F3

Breakpoints

  • Toggle breakpoint: ⌘ F8
  • Edit breakpoint: ⌘ ⇧ F8 (when cursor is on breakpoint LOC)
  • View breakpoints: ⌘ ⇧ F8 (when cursor is not on breakpoint LOC)

Editing Existing Code

  • Multiple cursors: ⇧ ⌥ Clicks
  • Toggle Column Selection mode: ⇧ ⌘ 8
  • Smart line join: ⇧ ⌃ J
  • Format code: ⌥ ⌘ L
  • Organize imports: ⌃ ⌥ O
  • Change method signature: ⌘ F6

Editing New Code

  • Surround with: ⌥ ⌘ T
  • Suggestions: ⌥ ⏎
  • Generate: ⌃ ⏎
  • Basic code completion: ⌃ Space
  • Smart code completion: ⌃ ⇧ Space

Navigation

  • Next / previous highlight: F2 / ⇧ F2
  • Next / previous location: ⌥ ⌘ ← / ⌥ ⌘ →

Various

  • View call hierarchy: ⌃ ⌥ H
  • Dictionary of actions or options: ⇧ ⌘ A
  • Toggle the terminal tool window visibility: ⌥ F12
  • Preferences: ⌘ ,
  • Project Structure: ⌘ ;

Iterators

  • iter: Iterate (for each..in)
  • itin: Iterate (for..in)
  • itar: Iterate elements of array
  • ritar: Iterate elements of array in reverse order
  • itco: Iterate elements of java.util.Collection
  • itit: Iterate elements of java.util.Iterator
  • itli: Iterate elements of java.util.List
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment