Documentation | Screencast | Predefined templates
This open source plugin lets you define your own postfix templates for Java, Scala, SQL, PHP, Kotlin, Python, Dart, JavaScript, Ruby, Rust, Go and Groovy. It also comes with hundreds of useful postfix templates shared by the community. You're welcome to contribute your templates as well.
Apart from the community approach, how does the plugin differ from IDEA's postfix templates?
Since IDEA 2018 you are now able to define your own postfix templates for some languages in the settings UI (Editor → General → Postfix Templates). However, this is a pretty new feature and it's less functional than this plugin. Here are some of the advantages of this plugin:
.toList
should behave differently for arrays and for sets.$varName$
) which are filled in by the user while applying the template.$var:suggestVariableName()$
) as well as you can define default values."test".val
to val s = "test"
if Lombok is available).array.toList
can be expanded to asList(array)
instead of Arrays.asList(array)
if you add [USE_STATIC_IMPORTS]
to the rule).