The Smart Enter completion enables you to create syntactically correct code constructs.
In this section:
Completing statements
To automatically complete a statement, follow these steps:
- Start typing a statement, and press ⇧⌘⏎ or ⇧⌘⏎⇧⌘⏎ or ⇧⌘⏎⇧⌘⏎ or ⇧⌘⏎^ ⇧ Enter, ⌃⇧⏎ or ⌃⇧⏎^ ⇧ Enter, ⌃⇧⏎ or ⌃⇧⏎.
The punctuation required in the current context is added and the caret moves to the next editing position.
Examples
Completing a method declaration
Start typing a method declaration, and press ⇧⌘⏎ or ⇧⌘⏎⇧⌘⏎ or ⇧⌘⏎⇧⌘⏎ or ⇧⌘⏎^ ⇧ Enter, ⌃⇧⏎ or ⌃⇧⏎^ ⇧ Enter, ⌃⇧⏎ or ⌃⇧⏎ after the opening parenthesis:

This will create the entire construct of a method, the caret resting inside the method body:

Completing code constructs
Start typing a code construct:

After pressing ⇧⌘⏎ or ⇧⌘⏎⇧⌘⏎ or ⇧⌘⏎⇧⌘⏎ or ⇧⌘⏎^ ⇧ Enter, ⌃⇧⏎ or ⌃⇧⏎^ ⇧ Enter, ⌃⇧⏎ or ⌃⇧⏎, the construct is completed, and the caret is placed at the next editing position:

Automatic encapsulation
IntelliJ IDEA automatically encapsulates a method call, when you directly type a new method call next to it. For example, consider the following code:
|"test"
Note the caret that rests just before the opening quote. Then type the method call.
When println gets the focus in the suggestion list, select it with ⇧⌘⏎ or ⇧⌘⏎⇧⌘⏎ or ⇧⌘⏎⇧⌘⏎ or ⇧⌘⏎^ ⇧ Enter, ⌃⇧⏎ or ⌃⇧⏎^ ⇧ Enter, ⌃⇧⏎ or ⌃⇧⏎.
System.out.println("test");
