Intellij IDEA has class/file templates like this:
/**
* Created by ${USER} on ${DATE}.
*/
where ${USER}
by default is logged in user name (or licensed user name for Ultimate versions).
I need to have name in file templates different from logged in OS user name. How can I change in IDEA this variable?
What I can, but this it not what i'm looking for:
- Change template header directly. NO, I need to change variable for all templates and other usages in the IDE.
- start IDEA from bat/cmd/lnk whatever with changed
%USERNAME%
OS environment variable. NO, I'm looking for solution in IDEA settings, not runtime settings. - changing
idea.exe.vmoptions
(idea64.exe.vmoptions
) like described in this and this answers may be a good solution, but has some disadvantages (applies changes system wide, requires admin privileges).
So, the main idea: is it possible in IDEA to set variable values in local user settings?
So, finally on Jetbrains bug tracker i found this issue, and apparently no fix for it is planned. If you are interested in some solution - vote for the feature request.
来源:https://stackoverflow.com/questions/34466991/change-user-environment-variable-in-intellij-idea