IntelliJ IDEA
 
Get IntelliJ IDEA
You are viewing the documentation for an earlier version of IntelliJ IDEA.

Postfix Completion

Last modified: 10 August 2022

File | Settings | Editor | General | Postfix Completion for Windows and Linux

IntelliJ IDEA | Preferences | Editor | General | Postfix Completion for macOS

Ctrl+Alt+S the Settings/Preferences icon

Postfix code completion lets you add template code around an expression you’ve just typed. A template expands when you type its abbreviation (postfix) after a dot and press the expansion key (Tab by default) or when you select the abbreviation in the code completion popup. For example, the .if postfix applied to an expression wraps it with an if statement.

IntelliJ IDEA is shipped with a set of predefined postfix templates and lets you define your own custom ones, see Create custom postfix templates.

Custom templates can be copied, updated, and removed. For predefined templates you can only change their postfixes, for example to replace a long key with a shorter one, or to expand the list of expression types where a template can be applied.

On this page, enable and disable postfix templates , create new ones, and choose keyboard keys to expand them.