IntelliJ IDEA Cheat Sheet

IntelliJ IDEA is a powerful integrated development environment (IDE) for Java and various other programming languages. Here’s a cheat sheet with some common shortcuts and features in IntelliJ IDEA:

General Shortcuts

  • Show/Hide Project Tool Window:
    • Mac: Cmd + 1
    • Windows/Linux: Alt + 1
  • Show/Hide Navigation Bar:
    • Mac: Cmd + Up Arrow
    • Windows/Linux: Alt + Home
  • Open Project Structure:
    • Mac: Cmd + ;
    • Windows/Linux: Ctrl + Alt + Shift + S
  • Find Action:
    • Mac: Cmd + Shift + A
    • Windows/Linux: Ctrl + Shift + A

Editing Shortcuts

  • Duplicate Line or Selection:
    • Mac: Cmd + D
    • Windows/Linux: Ctrl + D
  • Delete Line:
    • Mac: Cmd + Backspace
    • Windows/Linux: Ctrl + Y
  • Comment/Uncomment:
    • Mac: Cmd + /
    • Windows/Linux: Ctrl + /
  • Refactor This:
    • Mac: Ctrl + T
    • Windows/Linux: Ctrl + Alt + Shift + T

Navigation Shortcuts

  • Go to Class:
    • Mac: Cmd + O
    • Windows/Linux: Ctrl + N
  • Go to File:
    • Mac: Cmd + Shift + O
    • Windows/Linux: Ctrl + Shift + N
  • Go to Symbol:
    • Mac: Cmd + Opt + O
    • Windows/Linux: Ctrl + Alt + Shift + N
  • Go to Declaration:
    • Mac: Cmd + B
    • Windows/Linux: Ctrl + B
  • Navigate Back/Forward:
    • Mac: Cmd + [
    • Windows/Linux: Ctrl + Alt + Left/Right

Run/Debug Shortcuts

  • Run Application:
    • Mac: Shift + F10
    • Windows/Linux: Ctrl + Shift + F10
  • Debug Application:
    • Mac: Shift + F9
    • Windows/Linux: Ctrl + Shift + F9
  • Stop Process:
    • Mac: Cmd + F2
    • Windows/Linux: Ctrl + F2

Version Control Shortcuts

  • Open Version Control Tool Window:
    • Mac: Cmd + 9
    • Windows/Linux: Alt + 9
  • Commit Changes:
    • Mac: Cmd + K
    • Windows/Linux: Ctrl + K
  • Update Project:
    • Mac: Cmd + T
    • Windows/Linux: Ctrl + T

Search and Replace

  • Find:
    • Mac: Cmd + F
    • Windows/Linux: Ctrl + F
  • Replace:
    • Mac: Cmd + R
    • Windows/Linux: Ctrl + R
  • Find in Path:
    • Mac: Cmd + Shift + F
    • Windows/Linux: Ctrl + Shift + F

Code Generation

  • Generate Code:
    • Mac: Cmd + N
    • Windows/Linux: Alt + Insert
  • Override Methods:
    • Mac: Cmd + O
    • Windows/Linux: Ctrl + O
  • Implement Methods:
    • Mac: Cmd + I
    • Windows/Linux: Ctrl + I

Other Useful Shortcuts

  • Reformat Code:
    • Mac: Cmd + Opt + L
    • Windows/Linux: Ctrl + Alt + L
  • Optimize Imports:
    • Mac: Ctrl + Opt + O
    • Windows/Linux: Ctrl + Alt + O
  • Show Intention Actions:
    • Mac: Opt + Enter
    • Windows/Linux: Alt + Enter
  • Quick Documentation Lookup:
    • Mac: F1
    • Windows/Linux: Ctrl + Q

Remember that these shortcuts can vary based on your keymap settings and the specific context within IntelliJ IDEA. Check the keymap preferences for your preferred shortcuts. You can find more information and customize shortcuts in the IntelliJ IDEA documentation.