IntelliJ IDEA appeared suffix code auto-completion of the new features in version 2013.1 after. Now, I am very pleased to introduce automatic code completion suffix (Postfix Code Completion), which is a new class of code completion, in the hope that it can improve your programming efficiency.
IDEA version of this article used to 2019.3, first of all if you want to see all the suffixes auto-complete template or set, you can click on the Settings ... -> Editor -> General -> Postfix Completion enter, open to display the following:
Note: The suffix has been incorporated as part of the basic tips tips, so you do not need to find all available suffixes list of completions, only need to use CTRL + J shortcut key in the code context.
IDEA suffix automatic code completion feature can reduce the cursor jumps back when you're programming, it allows you to add your suffix based on the expression type and the current language expression into a mirror to the other.
Next are a few commonly used to demonstrate it to you:
if
Use if to check whether the Boolean expression is true.
else
Else can use Boolean expressions to check whether it is false.
for / iter
Through the collection.
holes
Indexing through the collection to iterate.
new
To create a new object class.
nn / notnull
Check if the expression is non-empty.
! / not
Negate.
null
Check if the expression is empty.
return
return value.
salt
Output.
try
Insert statements in the try-catch block.
tower
Insert statements in try-with-resources blocks (need Java version 7 or later).
while
Circulated to true boolean statement.
There are no extension to list, you can try it yourself, hope IDEA suffix completion feature has improved energy efficiency of your programming.