Can I move an IntelliJ product's root (not my project root) to a subfolder without breaking things?

Answered

I have the JetBrains Toolbox, and with it a bunch of JetBrain IDEs.

Each JetBrains IDE wants to put its particular projects in a folder in my home directory named after the IDE.  For instance:

  • ~/CLionProjects
  • ~/IdeaProjects
  • ~/PycharmProjects
  • ~/RustroverProjects
  • ~/WebstormProjects

I'd like a cleaner home directory, organized as I see fit, rather than applications just blindly dumping files in there as if they owned my home directory.

I already use a general ~/dev folder already for all my other projects (it gets backed up, has special scripts for it, I've got aliases for it, etc.).

Can I move those IDE directories to my dev folder without causing harm?  e.g.  $ mv ~/*Projects ~/dev

That begs several otehr questions:

  • Let's say I open a new IDE, how can I get it to put it's IDE project folder in ~/dev to start with?
  • Or, since I'm likely going to have to reteach the IDE the location of its files, can I just put the projects themselves in my ~/dev subdirectory (I know what language they are) and not have a per-IDE project folder in the first place?
  • Is anyone aware of any “dangerous” consequences where if everything is sharing the same projects folder and I uninstall one IDE or do some aggressive cleanup, will it take out all the other things in it as collateral damage?  (I know it shouldn't, but is there an edge-case that should talk me out of trying this in the first place?)

( Sorry there was not overall JetBrains topic to put this in on the support site.  I tried looking for an answer but using “home” or “root” flooded the results with discussion about intra-project particulars. )

0
1 comment

> Can I move those IDE directories to my dev folder without causing harm?  e.g.  $ mv ~/*Projects ~/dev

Yes, you can. However, the recent projects in the IDE will become invalid. You will either need to open these projects manually again or update the options/recentProjects.xml file in the IDE config directory (see https://www.jetbrains.com/help/idea/directories-used-by-the-ide-to-store-settings-caches-plugins-and-logs.html#config-directory for IntelliJ IDEA).

> Let's say I open a new IDE, how can I get it to put it's IDE project folder in ~/dev to start with?

Settings | Appearance & Behavior | System Settings | Default project directory.

> Or, since I'm likely going to have to reteach the IDE the location of its files, can I just put the projects themselves in my ~/dev subdirectory (I know what language they are) and not have a per-IDE project folder in the first place?

Yes, multiple IDEs can have the same default project directory.

> Is anyone aware of any “dangerous” consequences where if everything is sharing the same projects folder and I uninstall one IDE or do some aggressive cleanup, will it take out all the other things in it as collateral damage?  (I know it shouldn't, but is there an edge-case that should talk me out of trying this in the first place?)

We are not aware of anything that can cause the IDE to remove your projects. The only thing could be some code in your apps or tests that deletes files and is using some relative directory which may become incorrect and cause the deletion of all the files above a certain folder.

0

Please sign in to leave a comment.