IntelliJ IDEA Pro Tips: Postfix Completion

preview_player
Показать описание
Postfix completion is designed so that you append some abbreviation to the end of your code, and IntelliJ IDEA will know to generate more valid code. Type your code, followed by a postfix abbreviation like .sout or .var, and see IntelliJ IDEA generate code at the start of your expression.

To see a full list of postfix abbreviations for your code, type "." (dot) and press the "up" arrow on the dropdown list of suggestions. The postfix completions can be found at the bottom of the code suggestions list.

Find all available abbreviations Preferences/Settings | Editor | General | Postfix Completion.

*Author: Trisha Gee

Join us:

#java #intelliJIDEA #intelliJ #jetbrains #programming #getting_to_know_intellij
Рекомендации по теме
Комментарии
Автор

IntellJ Idea is like drug for Java developer, once you use it, it's hard to go back to any other IDE..BTW that cast postfix is awesome!!

nishikanttayade
Автор

Postfix is definitely an underused but fantastic addition to IntelliJ - thanks for putting the video together! Will share with my team

Syntax
Автор

This is great, never seen it before despite working for years with IntelliJ! Keep these tips coming!

amd
Автор

This is great! One of my favorites is for String.format. You can type the formatted String and postfix it with .format, and it will wrap the String in a String.format call and drop you off right at the next parameter to it

mizatt
Автор

Wow. Just wow. Not sure who invented it, but this person deserves a company's car :)

WeWalkAI
Автор

I was thinking about this the other day; I often have to scroll back to add the not:-) This is so useful for me. Thank you.

Greatfulone
Автор

Brilliant! Can't wait to try this out. Thanks for sharing!

michaelkalinowski
Автор

Awesome video!
Although, I thought Trisha Gee left Jetbrains.

JohnDoe-qzji
Автор

OH! So that's what those things are. i usually glance over them thinking they're something beyond me

noredine
Автор

Not only it is great to be able to use postfix completions... but also that you can create your own 😉

icougil
Автор

Probably Postfix will take some time get hands on, but it'll be worth.

bhaveshsalunke
Автор

I started getting use to that but it was dangerous because it locket me to IntelliJ, I was not able to write simple code in other editor or a notepad without mistakes from time to time or annoyances because a notepad doesn't have the completions. Is something that I now use with care

ChrisB_Crisps
Автор

I'm unable to edit most of the PostFix templates (aside from the Key), let alone duplicate them. The docs are kinda vague on that: "You can edit the predefined postfix templates, for example, to replace a long key with a shorter one, or to expand the list of applicable expression types.". Seeing other postfix templates would really help writing your own. For example how "var" is written to handle the specific cases which can occur. Any suggestions?

Blafasel
Автор

How can we get explicit type instead of var?

centfox
Автор

Okay; this is cool!

But is there way to make the variable 'static'? 99& of the variables I declare are static so if I have to move the cursor to and the qualifier then there is no benefit to the 'var' postfix for me.

Dobbo
Автор

Would be great if "var" works with Java 10's var as well. Like in your example: var generator = new Generator() instead of Generator generator = new Generator()

Quillraven
Автор

Hi everyone! Let me ask you. Is Java used for any new modern projects in these days or only for a legacy support ? Show me an example one. Thanks a lot.

cranebird