Can I share settings for IntelliJ Idea across diff

2019-01-26 05:15发布

In the month or so that I've been using IntelliJ, I have one project that I am working in the majority of the time in which I have all of my windows, toolbar locations, etc., set up to my liking.

I infrequently need to open other projects in IntelliJ, and I notice when doing so that all of the window locations seem to reset to the default. For example, the Structure toolbar moves back to the lower-left hand of the screen; I prefer for it to be docked in the upper-right hand corner.

Can settings for window and tool locations be shared across different IntelliJ projects? Can I configure this once globally, and have it apply to any new project I open in IntelliJ going forward?

Also, does anyone know where these types of settings are stored - I assume it's in the per-project IntelliJ files (such as .ipr, etc) rather than my global .settings directory?

3条回答
爱情/是我丢掉的垃圾
2楼-- · 2019-01-26 05:39
  1. Create new connection or go to connection "Properties" (Alt+ENTER)
  2. Find "Project Data Sources" on top left
  3. Select "Make Global" in context menu
查看更多
地球回转人心会变
3楼-- · 2019-01-26 05:42

For IntelliJ-13/14, if you want reuse the connection to databases and the appservers you should copy-paste these files between the .idea folders of the projects.

  • dataSources.ids, dataSources.xml : Database stuff
  • workspace.xml : All the appservers configuration

Yes, this sucks, but at least there is a workaround.


EDIT: When you create/edit the datasource there is a combobox called "scope", you can select IDE option, and this will let you reuse the datasource across many projects.

查看更多
来,给爷笑一个
4楼-- · 2019-01-26 05:53

You are right, these settings are project specific and you can't make them default. They are stored in the .idea/workspace.xml or in the <project>.iws file depending on the project format you are using.

You can try to overwrite this file in the new project with the one from the old project so that your settings are transferred.

查看更多
登录 后发表回答