Getting the Most From JetBrains’ File Templates

Amy Blankenship
6 min readFeb 17, 2024

You’ve got a great idea for a new component, and all you want to do is start coding. But when you add a new file, before you can get to the fun part, you need to fill in the same old boring boilerplate. Even though modern IDEs and frameworks have reduced that to the bone, there’s still enough to slow you down.

What if I told you you can create a template that can take you straight from File>New to the good part in about 10 seconds?

It will take you some setup, but that’s what we do as programmers. We put in a bit of extra effort up front so that we can speed through later tasks. Let’s get started!

JetBrains Templates

First, you need to be using a JetBrains IDE, such as IntelliJ or Webstorm. Luckily, they have IDEs customized for a variety of languages, so you can probably find one that’s right for you. They also have a generous trial period, so you can have plenty of time to see if all the productivity features work for you.

If you already use a JetBrains IDE, you might have already played with Live Templates. Live templates let you start typing and then expand out to a complete block of text that you can even set up to prompt you for values to suit your specific task.

--

--

Amy Blankenship
Amy Blankenship

Written by Amy Blankenship

Full Stack developer at fintech company. I mainly write about React, Javascript, Typescript, and testing.