When editing different projects, let idea use different environment variables

Answered

When I write all projects, I use file templates to create classes. For the header of the class template, I add a tag @author. @author uses the environment variable ${USER}, which is the currently logged-in user. However, in some specific projects, the currently logged-in user cannot be used and a different name needs to be specified.
After each creation, it is necessary to modify it, which is very inconvenient. Idea configures according to the project. When creating a class using project A, ${USER} obtains the user name from the system variable. When using project B, a custom user name is used

0
1 comment
The IDE loads the system environment once it's started. However, only 1 instance is allowed. 
I think you can launch different versions of the IDE from CLI with different system env settings and open different projects.
https://intellij-support.jetbrains.com/hc/en-us/articles/360011901879-How-to-start-IDE-from-the-command-line
0

Please sign in to leave a comment.