Skip to content

Instantly share code, notes, and snippets.

@longkai
Last active August 18, 2016 13:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save longkai/ccf21e39bd0007626f37e5b66441ff7d to your computer and use it in GitHub Desktop.
Save longkai/ccf21e39bd0007626f37e5b66441ff7d to your computer and use it in GitHub Desktop.
Relearning Intellij keymap for mac only

Intellij Keymap

Eidting

key decription
⇧ F1 External Doc(not work for all source)
⌘ F1 Show descriptions of error or warning at caret
⌘ N Generate code...
^ O Override methods
^ I Implement methods
⌥⌘ T Surround with… (if..else, try..catch, for, synchronized, etc.)
^⌥ O Optimize imports
^⌥ I Auto-indent line(s)
⌘ + / ⌘ - Expand/collapse code block
⌘⇧ + Expand all
⌘⇧ + Collapse all

Search/Replace

key decription
⌘⇧ F Find in path
⌘⇧ R Replace in path

Usage Search

key decription
⌘ F7 / ⌥ F7 Find usages / Find usages in file
⌘⇧ F7 Highlight usages in file
⌘⌥ F7 Show usages

Compile and Run

key decription
^⌥ R Select configuration and run
^⌥ D Select configuration and debug
^ R Run
^ D Debug
^⇧ R, ^ ⇧ D Run context configuration from editor

Debugging

key decription
F7 Step into
F8 Step over
⇧ F7 Smart step into
⇧ F8 Step out
⌥ F9, ⌥⌘ F9 Run to cursor, force
⌥ F8 Evaluate expression
⌘⌥ R Resume program
⌘ F8 Toggle breakpoint
⌘⇧ F8 View breakpoints

Navigation

key decription
⌘ O Go to class
⌘⇧ O Go to file
⌘⌥ O Go to symbol
F12 Go back to previous tool window
⇧ ESC Hide active or last active window(reverse F12)
⌘⌥ ←/→ Navigate back/forward
⌘⇧ del Navigate to last edit location
⌥ F1 Select current file or symbol in any view
⌘ B Go to declaration
⌘⌥ B Go to implementation(s)
^⇧ B Go to type declaration
⌘ Y Open quick definition lookup
⌘ U Go to super-method/super-class
^ H Type hierarchy
⌘⇧ H Method hierarchy
^⌥ H Call hierarchy
F2 Next/previous highlighted erro
⌘ ↓ / F4 View source/Edit source
F3 Toggle bookmark
⌥ F3 Toggle bookmark with mnemonic
^ n Go to numbered bookmark
⌘ F3 Show bookmarks

Refactoring

key decription
F5 Copy file
F6 Move file
⇧ F6 Rename
⌘ F6 Change Signature
⌘⌥ N Inline
⌘⌥ M Extract Method
⌘⌥ V Extract Variable
⌘⌥ F Extract Field
⌘⌥ C Extract Constant
⌘⌥ P Extract Parameter

Live Templates

key decription
⌘ J Insert Live Template
⌘⌥ J Surround with Live Template

General

key decription
⌥⇧ F Add to Favorites
⌥⇧ I Inspect current file with current profile
`^ `` Quick switch current scheme

todo

  • Context info
  • Show intention actions and quick-fixes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment