Completion suffix used well, leave work early to not worry

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:

Postfix Completion

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.

ctrl+j

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.

if

else

Else can use Boolean expressions to check whether it is false.

else

for / iter

Through the collection.

for

holes

Indexing through the collection to iterate.

holes

new

To create a new object class.

new

nn / notnull

Check if the expression is non-empty.

nn/notnull

! / not

Negate.

not

null

Check if the expression is empty.

null

return

return value.

return

salt

Output.

salt

try

Insert statements in the try-catch block.

try

tower

Insert statements in try-with-resources blocks (need Java version 7 or later).

tower

while

Circulated to true boolean statement.

while

There are no extension to list, you can try it yourself, hope IDEA suffix completion feature has improved energy efficiency of your programming.

Guess you like

Origin www.cnblogs.com/wupeixuan/p/12154533.html