File Template Custom Variables
I'm having a heck of a time understanding how one goes about creating custom variables for use in file templates. I created a new variable in a template called ${MYVAR}, but how do I go about defining that variable and what content goes into it? I read the docs but the content for this specific topic is very thin. Any help would be appreciated.
Doug
Please sign in to leave a comment.
Hello Doug,
If you define a custom variable, a dialog will be shown when you create a
file from that template, prompting you to specify the value of the variable.
--
Dmitry Jemerov
Development Lead
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"
It's not prompting me for the value. I've modified the default 'Python Script' file template and added ${MYVAR}. I then create a new python file in my project and it doesn't prompt for the value. Am I missing something?
Doug
Any other ideas?
I have the same problem in PHPStorm.
My template for PHP file is:
Include PHP file header.php is:
Include PHP class header.php is:
But these variables aren't expanded (and there is no prompt for their values too) neither during new file creation nor class creation.
Hi,
I had the same problem trying to change the default "Python Unit Test" template and using undefined custom variable. I solve the problem by creating a new template and now the value of custom variable is asked at the same time than the filename.