sebastiandaschner blog


My IntelliJ Live Templates

thursday, april 23, 2020

I was asked to share my live templates that I’m using in IntelliJ IDEA together with my dotfiles.

You can find the templates in my Dotfiles repository on GitHub.

I found it especially helpful to create even small templates that mostly and an import that you don’t have to manually select.

intellij livetemplates

I created the following templates groups, depending on the technology you’re using:

  • Java (e.g. liList<>)

  • Java / Jakarta EE (e.g. ph@Path)

  • Java FX (e.g. fxm@FXML)

  • Testing (JUnit / AssertJ, e.g. asthassertThat())

  • Maven (Maven dependencies)

  • Docker (Dockerfile contents)

  • Kubernetes / Istio (YAMLs)

  • Quarkus (Quarkus properties)

There is also a templates.xml file that prevents collisions with existing default templates shipped with IntelliJ.

Any others that you find helpful? I’m happy to hear your feedback.

 

Found the post useful? Subscribe to my newsletter for more free content, tips and tricks on IT & Java:

All opinions are my own and do not reflect those of my employer or colleagues.