Post

IntelliJ

Shortcuts

  1. Go to next Error
    • F2
  2. Go to previous/next method
    • Alt + Up/Down
  3. Clipboard manager
    • Ctrl + Shift + V
  4. Windows Clipboard manager
    • Windows + V
  5. File structure (even non-java files!)
    • Ctrl + F12
  6. Surround with
    • Ctrl + Alt + T
      • e.g. if-else, try-catch-finally, synchronized, iterate, Runnable
      • You can also configure your own Live Templates
  7. Refactor this menu
    • Ctrl + Alt + Shift + T
      • e.g. Rename, Change signature, Extract method, Inline method
  8. Compare files
    • Select files
      • Ctrl + D

Tricks / Features

  1. Find shortcut
    • File -> Settings -> Keymap
      • -> Find actions by shortcut
  2. Jump to File with Line Number Ctrl + N
    • Class:LineNumber
    • e.g. StringUtils:1500
  3. You can filter search results by namespaces
    • e.g. Ctrl + Alt + Shift + N
      • -> String.contains
  4. Using Ctrl + E you can also quick move to other tabs
    • like Database, Maven, Terminal
  5. Autoformat the whole package
    • Select package
      • -> Ctrl + Alt + L
  6. Refactor tab
    • e.g.
      • Replace Constructor with Factory Method
      • Replace Inheritance with Delegation
      • Replace Method with Method Object
      • Encapsulate Fields
      • Type Migration
      • Convert to instance method