IDEA 默认会在用户文件夹创建配置目录,发现我的 IDEA 配置目录已经十几G了,决定迁移到其他盘。
例如我的是2018.1版本的:
- 迁移
{用户目录}/.IntelliJIdea2018.1
文件夹到D:/Java/JetBrains/.IntelliJIdea2018.1
- 修改
{IDEA目录}/bin/idea.properties
文件的内容如下:
idea.config.path=D:/Java/JetBrains/.IntelliJIdea2018.1/config
idea.system.path=D:/Java/JetBrains/.IntelliJIdea2018.1/system
idea.plugins.path=${idea.config.path}/plugins
idea.log.path=${idea.system.path}/log
重启搞定。
参考
- Changing IDE default directories used for config, plugins, and caches storage
- Default IDE configuration directory
新的修改配置方式,解决更新Idea后丢失配置的问题
想要修改 \bin\idea.properties
文件时,不要直接编辑这个文件,而是通过点击菜单 Help | Edit Custom Properties
进行编辑。这样会创建一份配置文件副本在用户目录下,并且升级 Idea 的时候仍然保留配置。
参考
Configuring JVM options and platform properties
扩展阅读
修改 GoLand 的默认目录,可以参考 Platform properties