Change ${USER} environment variable in Intellij IDEA

烂漫一生 提交于 2019-12-20 05:01:27

问题


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?


回答1:


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!