Tutorial by Examples

Make project (compile modifed and dependent) Windows: Ctrl + F9 OS X / macOS: Cmd + F9 Compile selected file, package or module This is useful to know, as when debugging this shortcut can be used to quickly reload / hotswap classes. Windows: Ctrl + Shift + F9 OS X / macOS: Cmd + Shift + F9 Se...
Basic code completion (the name of any class, method or variable) Windows: Ctrl + Space OS X / macOS: Cmd + Space Smart code completion (filters the list of methods and variables by expected type) Windows: Ctrl + Shift + Space OS X / macOS: Cmd + Shift + Space Overwriting code with a suggestio...
Search everywhere Double Shift Find Windows / Linux: Ctrl + F OS X / macOS: Cmd + F Find next F3 Find previous Shift + F3 Replace Windows / Linux: Ctrl + R OS X / macOS: Cmd + R Find in path Windows / Linux: Ctrl + Shift + F OS X / macOS: Cmd + Shift + F Replace in path Windows / Lin...
Copy F5 Move F6 Safe delete Windows / Linux: Alt + Delete OS X / macOS: Cmd + Delete Note that the Delete key on OS X / macOS is the equivalent of the Backspace key on other operating systems. Rename Shift+ F6 Extract Method Windows / Linux: Ctrl + Alt + M OS X / macOS: Cmd + Option + M ...
Surround with Surrounds a code block with an if, for, <editor-fold ...> and more. Windows / Linux: Ctrl + Alt + T OS X / macOS: Cmd + Option + T
Go to editor (from tool window) Esc Switching focus to corresponding tool window Windows: Alt + <tool window number> OS X / macOS: Cmd + <tool window number> For example switching focus to the project window Windows: Alt + 1 OS X / macOS: Cmd + 1 Recent files popup Windows: Ctrl...
Find usages / Find usages in file Windows / Linux: Alt + F7 / Ctrl + F7 OS X / macOS: Option + F7 / Ctrl + F7 Highlight usages in file Windows / Linux: Ctrl + Shift + F7 OS X / macOS: Cmd + Shift + F7 Show usages Windows / Linux: Ctrl + Alt + F7 OS X / macOS: Cmd + Option + F7
Windows / Linux: Ctrl + P OS X / macOS: Cmd + P Shows what parameters a method and all of its overloads accepts.
Selection with increasing scope This comes handy when you want to select a block to extract a variable / method etc, no need to do a precise bracket matching, just put the caret somewhere in the statement and keep doing this Windows: Ctrl + W OS X / macOS: Cmd + W Selection with decreasing scope...

Page 1 of 1