We are sharing our Project settings inside our team (.idea folder is committed to git) and some of us are using IntelliJ IDEA, some are using WebStorm.
What is really annoying is that WebStorm removes the IntelliJ IDEA settings. For example in misc.xml IntelliJ IDEA adds the following:
<component name="ProjectRootManager" version="2" assert-keyword="false" jdk-15="false" />
This is removed by WebStorm and then added again by IntelliJ IDEA. So in almost every commit this is toggled.
Is there any way to work around this except for completely ignoring the file?
Different Idea-based IDEs (RubyMine, PHPStorm, WebStorm, PyCharm, IDEA) have the same project format (.idea) but different settings/module types that aren't compatible. So sharing .idea folder may results in losing your settings, etc.
If you like to work on the same sources in different IDEs, I'd suggest sharing the sources folder(s) but keeping the .idea folders separated.
Related feature request: IDEA-140809
Related
I've dug a lot and learned how to share the run configurations in IntelliJ IDEA CE (presently using 2019.3.4) via the in .idea/runConfigurations/*.xml files. When we check those file into VCS (Git) others get them and all works as expected.
The question is related to sharing the templates for JUnit and Application configurations. When created manually they end up in .idea/workspace.xml which is not meant for or suitable for sharing (often modified, has personal preferences and even screen locations, ...).
I could not find any mention of how to do this so I tried extracting the relevant <component ...>...</component> fragments into standalone files inside .idea/runConfigurations/. This seemed to work but weird things started happening - IDEA renamed the files from my original names (whatever they were, forgot), to:
.idea/_template__of_JUnit.xml and
.idea/_template__of_Application.xml
I was happy with that and submitted those to Git but then other people commented how IDEA keeps renaming those files further.
What is the proper way to accomplish this?
Thanks!
IntelliJ IDEA doesn't support sharing run/debug configuration defaults at the moment.
We started a directory-based project in IntelliJ IDEA (currently using version 2016.3 build 163.7743.44). Everything is fine, the .iml file is inside .idea/modules and we can easily share/update it.
The issue is that, sometimes, when someone clones the project and start using it the IDE doesn't care about that file (or project structure) and puts an .iml outside the project's root. It's an intermittent/random issue and I'm not able to reproduce it step by step.
We opted for deleting the .idea directory from Git and keep the configurations/settings in a JAR file.
Is there any way to tell the IDE to use one approach or the other? It's not a big deal, but I would like to know what's the reason behind that behavior.
The reason for that behavior may be that people don't use the "Open" action to open the project but use the "Import project from existing sources" action instead. The latter action does not use the existing .idea directory, but instead recreates the project structure from scratch. You should teach your colleagues not to use that action.
Note that storing the settings in a .jar file is not a replacement for sharing the project structure, because shared settings do not include project-specific items such as libraries and run configurations.
I was searching for linters in PhpStorm's plugin directory, but there are no results, which seems strange to me. Are people not using linters for their stylesheets in PhpStorm?
Is there any other way to lint LESS files in a PhpStorm project?
For example, I need all properties to be sorted alphabetically within a class definition.
At this time, there is no easy way to automatically rearrange the style properties in LESS files using a PhpStorm plugin. (The stylint plugin in in version 2016.3 does not affect LESS files).
I ended up building a grunt task for CSSComb, which works fine.
I am using IntelliJ and after very long time I was not able to figure out, what IntelliJ specific files should not or should not be in VCS. I have a project which has different running configurations among various commits, so everytime when I checkout the project from different branch, I have to adjust the Running/Debug configurations. Jetbrains does not recommend to put workspace.xml in VCS because it could contain user-specific settings, however this information about Run/Debug configurations IS stored here! It would be 10x smarter to store in IML file (IntelliJ project file). How do you solve this?
In the run configuration dialog (top right corner), there is the "Share" checkbox. If you mark a run configuration as shared, it will be stored in a separate file under .idea and not in workspace.xml, and you'll be able to add it to the version control system normally.
When I delete a file (either a class, a library or anything) from a project in IntelliJ , the file will also be deleted from the disk physically! Is there any way to avoid this? I may still need the file, but I just don't want it in this project.
You have to copy it away from the place on the disc manually before deleting it.
Your IDE uses different build systems (e.G. maven, ant, etc...) and cannot rely on all of them to correctly "ignore" stuff you have marked as deleted.
I usually have a "misc" project in my IDE where I move stuff like what you described.
The same goes for all IDEs, be it IntelliJ, Netbeans or Eclipse. The representation in your project should always be the same as on your disk.