JetBrains系列IDE高级配置

JetBrains系列IDE如何修改配置、插件、日志位置

这些可以通过修改 IDE_HOME\bin\idea.properties 里面以下属性调整

  • idea.config.path
  • idea.system.path
  • idea.plugins.path
  • idea.log.path

或者使用Help | Edit Custom Properties 修改这些属性。

但是IDE升级或者重装后就失效了;

那把这些属性通过环境变量设置不就好了么,那如果你需要安装多个IDE这时刻咋办?

那是否可以使用外部idea.properties文件了,no problem。

IDE读取idea.properties的顺序为:

  1. 环境变量 %IDE%_PROPERTIES

    • IDEA_PROPERTIES — IntelliJ IDEA
    • CLION_PROPERTIES — CLion
    • APPCODE_PROPERTIES — AppCode
    • PYCHARM_PROPERTIES — PyCharm
    • RUBYMINE_PROPERTIES — RubyMine
    • DATAGRIP_PROPERTIES — DataGrip
    • STUDIO_PROPERTIES — Android Studio
    • WEBIDE_PROPERTIES — WebStorm
    • PHPSTORM_PROPERTIES — PhpStorm
    • GOLAND_PROPERTIES — GoLand
    • RIDER_PROPERTIES — Rider
    • RUSTROVER_PROPERTIES — RustRover

    如:IDEA_PROPERTIES=C:\Users\USER\idea.properties

  2. %username%\idea.properties

  3. %IDE_HOME%\bin\idea.properties

  4. 默认的config目录下

    推荐使用方法一和方法二

    当然也可以使用Toolbox APP Settings | Configuration | Custom JVM options file location | System, plugins, config and logs directory.

如何修改JVM参数

使用Help | Edit Custom VM Options 当然是没问题的

IDE读取%IDE%64.exe.vmoptions的顺序如下

  1. %IDE%_VM_OPTIONS

  2. 使用Toolbox 修改的位置

  3. 默认的config目录下%IDE%64.exe.vmoptions

  4. %IDE_HOME%\bin%IDE%64.exe.vmoptions

    当然IDE的目录名称和配置文件的名称保持一致也是没有问题的

    JetBrains

    --------GoLand

    --------GoLand.vmoptions

如何合二为一

-server
-XX:MetaspaceSize=128M
-XX:MaxMetaspaceSize=512M
-XX:+AlwaysPreTouch
-Xms2G
-Xmx4G
-XX:ReservedCodeCacheSize=512m
-XX:+UseG1GC
-XX:+UseStringDeduplication
-XX:AutoBoxCacheMax=20000

-Dsun.io.useCanonCaches=false
-Dsun.awt.keepWorkingSetOnMinimize=true
-Djava.net.preferIPv4Stack=true
-Djdk.http.auth.tunneling.disabledSchemes=""
-Djsse.enablesSNIExtension=false
-XX:+HeapDumpOnOutOfMemoryError
-XX:-OmitStackTraceInFastThrow
-Dfile.encoding=UTF-8
# JIT 参数
# 设置用于编译的编译器线程数
-XX:CICompilerCount=2
# 开启分层编译
-XX:TieredStopAtLevel=1
# 控制最大数量嵌套调用内联
-XX:MaxInlineLevel=3
-XX:Tier4MinInvocationThreshold=100000
-XX:Tier4InvocationThreshold=110000
-XX:Tier4CompileThreshold=120000
-Didea.config.path=D:\DevKit\JetBrains\.GoLand\config
-Didea.system.path=D:\DevKit\JetBrains\.GoLand\system
-Didea.log.path=D:\DevKit\JetBrains\.GoLand\system\log
-Didea.plugins.path=D:\DevKit\JetBrains\.GoLand\config\plugins
最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容