Any way to configure project specific Autosave options in WebStorm? - intellij-idea

I'm expecting to set different Autosave options for different projects as needed.

Related

How to share just part of the IntelliJ settings repository?

I'm testing out the Setting Repository feature, but we only want to share certain settings. Specifically, codestyles and inspections. Near as I can tell so far in playing with it, you have to share everything or nothing.
But everyone has their own keymaps and color scheme, we don't want to share those bits.
Is there a way to configure this IntelliJ feature to share just selected portions of the settings?
You can create a scheme for your project by selecting "Project" in the Code Style configuration:
When doing that, a "Project" code style file will be generated in your project tree:
You can add this file to your VCS, like Git. And everyone working with you will be able have the same settings for Code Style.

PhpStorm synchronise settings company wide

I'm currently try to establish company wide coding standards and different setting which should be the same on every developers setup.
There are multiple way to achive this and the current aproach to sync some of the .idea-folders files via version control doesn't seems to be as easy as expected.
We also tried to use the 'Settings Repository' plugin which ended up in confusion.
Has anyone tried solve a similar problem? Does anyone use the plugin successful in a bigger team?
Would be happy to get some of your thoughts on this.
Best regards
With the recent release of PhpStorm 2017.2 it's now possible to apply code style from ESLint.
https://www.jetbrains.com/phpstorm/whatsnew/
Import from ESLint
You can now import some ESLint code style rules to the IDE’s
JavaScript code style settings. Reply ‘Yes’ when prompted about this
in the .eslintrc file to apply the matched rules and make the IDE
formatting more consistent with your ESLint configuration.
That's still not completely automatic, but maybe better than having the .idea folders in the repo.
Admin in your company setups personal Settings Repository (Upsteam).
Configures code styles schemes.
Developer in your company adds this repository as "read-only source" (https://www.jetbrains.com/help/idea/settings-repository.html)
Currently, sometimes read-only source changes are not synced automatically, in this case please use VCS -> Sync Settings -> Merge.

Make *.apib files load into IntelliJ Markdown plug-in

How can I tell IntelliJ (or its Markdown or Multimarkdown plug-in) that files named *.apib are Markdown, and should be handled the same way as files named *.md?
I found the Preferences for the plugins (Preferences: Other Settings: Markdown/MultiMarkdown), but these only control what it means to "be handled the same way," not how to get there in the first place.
I also found Preferences: Plugins, but it only seems to handle installing the plugins, not configuring them.
Open Preferences and choose Editor. Select File Types and select Markdown Language, then add *.apib to the list of patterns.

IntelliJ & Global Config Files

I've been searching for a solution but I can't find one.
I have a global configuration directory in my IntelliJ workspace. I also have several dozen modules. I would like each module to automatically include the global config directory in its path when I run or test a class.
Is there anyway to do this within IntelliJ? I don't think I should need to edit the configuration for each "Run/Debug" config to include the directory.
You'll want to set it in the Defaults for the type of Run or Debug Configuration that you are using.
For example, if I always want a Java Application to have the VM Option -XPutYourThingyHere, then I could go to Edit Configurations, Defaults, Application, and put -XPutYourThingyHere in the VM Options box. Then all new Applications that I run will have that option.

How to share Code Style settings between developers in IntelliJ

I would like all developers on my team to use the same default code style settings. We all use IntelliJ 11+ as our IDE and we use git as our source control system.
What is the easiest way to make sure they're all using the same settings? I thought there would be a way to check in the style settings into the project and have their editors discover them automatically, but that doesn't seem to be the case.
PS. I don't mind if developers consciously override some of the default settings with their own preferences, but I do want to make sure that we all at least start from a common set of default settings.
Code Style can be copied to project and saved in .idea/codeStyles to be shared via version control:
Copy to Project Click this button to create a copy of the current global scheme to the project level. After creating the copy, IntelliJ
IDEA suggests to switch to this new scheme at the project level.
The Settings Repository feature was introduced at IntelliJ IDEA 2016.
This option helps us to share IDE settings between different computers, including sharing settings between developers.
The settings are stored at Git repository, for example on GitHub or Bitbucket.
To setup Git repository we should set URL via Settings Repository menu option.
The developer can load remote settings, overwrite remote settings or merge local settings with remote ones.
The structure of Git repository with settings:
I used personal access token for GitHub authentication.
More information:
Settings Repository
Creating a personal access token for the command line
I came across this long after the fact, but thought I'd share if anyone ran into this. Add the following to your .gitignore
# IDE - IntelliJ
/.idea/*
# Keep the code styles.
!/.idea/codeStyles
/.idea/codeStyles/*
!/.idea/codeStyles/Project.xml
!/.idea/codeStyles/codeStyleConfig.xml
# Keep the inspection levels
!/.idea/inspectionProfiles
/.idea/inspectionProfiles/*
!/.idea/inspectionProfiles/Project_Default.xml
And of course, make sure your .gitignore also has a ! in front of it so these changes get picked up.
Basically, gitignore's recursive looking is a little wonky, so the below ignores a directory's contents, except for a subdirectory, then ignores that subdirectory's contents, except for the files we want.
codeStyleConfig lets you use per project settings, the project file itself is your actual code styles, and I included the Project_Default as it holds the warning levels, which you likely want if you're doing the code style work anyways.
You can create .editorconfig file in Your project (and it can be managed on directory level). More info on https://www.jetbrains.com/help/idea/configuring-code-style.html#editorconfig and https://editorconfig.org/
With this approach You can keep all Your code style settings in one file and it's not limited to IJ only.