1、在idea目录下(和bin同级)新建目录:.IntelliJIdea
,然后在.IntelliJIdea
下新建system和config目录
2、迁移原有的.IntelliJIdea
,默认的位置如下:
system:
C:\Users\<用户名>\AppData\Local\JetBrains\IntelliJIdea2021.3
将上面目录下所有文件拷贝到system下
config:
C:\Users\<用户名>\AppData\Roaming\JetBrains\IntelliJIdea2021.3
将上面目录下所有文件拷贝到config下
3、修改bin\idea.properties
#---------------------------------------------------------------------
# Uncomment this option if you want to customize a path to the settings directory.
#---------------------------------------------------------------------
# idea.config.path=${user.home}/.IntelliJIdea/config
idea.config.path=${idea.home.path}/.IntelliJIdea/config
#---------------------------------------------------------------------
# Uncomment this option if you want to customize a path to the caches directory.
#---------------------------------------------------------------------
# idea.system.path=${user.home}/.IntelliJIdea/system
idea.system.path=${idea.home.path}/.IntelliJIdea/system
#---------------------------------------------------------------------
# Uncomment this option if you want to customize a path to the user-installed plugins directory.
#---------------------------------------------------------------------
# idea.plugins.path=${idea.config.path}/plugins
idea.plugins.path=${idea.config.path}/plugins
#---------------------------------------------------------------------
# Uncomment this option if you want to customize a path to the logs directory.
#---------------------------------------------------------------------
# idea.log.path=${idea.system.path}/log
idea.log.path=${idea.system.path}/log