IntelliJ IDEA覆盖$ user [英] IntelliJ IDEA override $user

查看:531
本文介绍了IntelliJ IDEA覆盖$ user的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是一个非常简单的问题,但我找不到使用SO-Search和Google的答案。

It's a quite simple question, but I can't find an answer to it using SO-Search and Google.

是否可以覆盖默认 $ user 全局使用文件模板中的VTL变量,而不是使用 #set($ user =...)<在每个模板中设置它/ code>?

Is it possible to override the default $user VTL-variable used in file-templates globally, instead of setting it in each template with #set($user = "...") ?

像IntelliJ本身的某种设置脚本,我可以在哪里改变价值?

Like some sort of setup-script for IntelliJ itself, where I can alter the value?

提前致谢。

顺便说一句,我使用的是IntelliJ Ultimate 12.1.6。

By the way, I'm using IntelliJ Ultimate 12.1.6.

推荐答案

您想在文本编辑器中修改IntelliJ的 .vmoptions 文件。

You want to modify the IntelliJ's .vmoptions file(s) in a text editor.


  • 在Windows中,编辑 IntelliJ-Install-Location / bin / idea.exe.vmoptions 和/或 IntelliJ-Install-Location / bin / idea64.exe.vmoptions

  • 在Mac OS X中,编辑 IntelliJ- Install-App.app/Contents/bin/idea.vmoptions

  • In Windows, edit IntelliJ-Install-Location/bin/idea.exe.vmoptions and/or IntelliJ-Install-Location/bin/idea64.exe.vmoptions.
  • In Mac OS X, edit IntelliJ-Install-App.app/Contents/bin/idea.vmoptions.

在这些文件中,只需添加或修改以下行:

Within these files simply add or modify the following line:

-Duser.name=Your name

如果你认识到这种语法,因为Intellij IDEA使用Java系统属性 user.name 来填充 $ user $ {USER}

If you recognize this syntax, that's because Intellij IDEA uses the Java System Property user.name to fill $user and ${USER}.

这篇关于IntelliJ IDEA覆盖$ user的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆