How to set a filename for file templates in IntelliJ

Viewed 480

I am trying to create a new file template in IntelliJ for a specific type of file needed by the framework I am using. The name of this file is always going to be base.kt, and I have added the file template as per this:

File Templates Dialog

This works fine for me other than the fact that everytime I right-click on a module and say 'New base.kt', it still asks me to enter a filename. For the package-info file template that comes pre-shipped with IntelliJ, it just creates the file without prompting this dialog:

File name input dialog

Is there a way for me to make IntelliJ always use a particular name and skip this dialog?

1 Answers

You just need to write #set($NAME="base")

Related