Configurable email in a file header template
Answered
I want to use a solution or team header template but specify something like $EMAIL$ to be specific for developer who created a file. Is it possible to define a part of a header to insert a user configurable variable?
Please sign in to leave a comment.
Hello Denis Kruchkov,
Thank you for contacting us.
Unfortunately, it's not possible to define a part of a header to insert a user configurable variable.
Here's a corresponding feature request - https://youtrack.jetbrains.com/issue/RSRP-274379.
Mentioned feature request says that it is possible for file templates. Is it the case?
Denis Kruchkov,
Yes, it's possible for a File template, but keep in mind, in this case, you can't add this File Header to existed files.
When you create a new File template, you can specify whatever you want as code for the template including custom variables. Here you can read more about it.
I've read proposed article and couldn't understand how can I make what I need. I can define my own variable but then I need to specify a macro for it. How can I make a file template where $EMAIL$ would be replaced with an email of a person who used this template?
Hello Denis Kruchkov,
You may provide a list of emails as a "Comma-delimited list of values" macro in a file template.
As you may expect the list isn' known in advance. But even if it is known it is very inconvenient to select it each time. For some particular person it is fixed. What could help is to refer to a variable or template defined at the different configulation layer, e.g. specific for computer. Or define an own macro. Is it possible?
Yes, we understand your point. For now, we are waiting for other people to vote for this request - https://youtrack.jetbrains.com/issue/RSRP-274379. If there are enough votes, we will consider implementing it.