About

Keyboard shortcuts and various tips for IntelliJ IDEA. This document assumes IntelliJ on a Mac, using the Keymap setting for Mac OS X 10.5+ (in Preferences > Keymap). I know you can get all these through Help > Keymap Reference in IntelliJ, but I like to maintain my own list so that I can organize and search it the way I prefer, plus have a place to add my own additional notes.

Editing

Comment / uncomment selected textSelect block of text and then press Command + /
Spread selection from cursor (to word, then line, etc.)ALT + up arrow or down arrow
Format selected codeCTRL + ALT + I
Format all codeALT + CMD + L
Autocomplete method parameter infoCMD + P (when cursor is in method signature)
Invoke a Surround Template (ex: surround a line with try/catch)OPTION + CMD + T
Complete a statementSHIFT + CMD + ENTER
Import Java PackageHover over the red text of the class missing a package and press:
ALT + ENTER


Navigation

Tool Windows and Dialogs

ProjectCMD + 1
Version ControlCMD + 9
PreferencesCMD + ,
BreakpointsSHIFT + COMMAND + F8
Recent FilesCMD + E
Search EverywhereSHIFT + SHIFT
Search ClassesCMD + O
Search SymbolsOPTION + CMD + O
Navigate back and forth through recent filesCMD + [ and CMD + ]
New file (where selection is in Project window)

CMD + N

Note: you can use slashes to create entire trees abc/def/ghi/jkl...

Hide all other windowsSHIFT + CMD + F12
Stretch pane right or leftSHIFT + CMD + left or right arrow
Clipboard HistorySHIFT + CMD + V
Method List (of the active editor file)CMD + F12
Navigation Bar

CMD + up arrow

Note: This is particularly useful if you turn off the normal navigation bar in preferences to save UI space.

Action SearchSHIFT + CMD + A (try, for example, "RESTful Web Service")
Version Control Quick ListCTRL + V
Quick Switch SettingsCTRL + ~
Quick DocumentationCTRL + J (and then again to pin it open at larger size).


Live Templates

Live templates can be found in Preferences > Editor > Live Templates. Learn them!

To use a live template, enter its short text in the editor and then press tab to replace the short text with its template.