Default IDEA mechanic of imports optimization changes the order of import statements. That leads to messy commit history in big projects with different code styles. This plugin replaces that mechanic, and, while keeping all the features, disables changing the order of import statements.
- make sure IDEA version is 2017.1 or higher / Android Studio 3.0.1 or higher
- download the jar file from releases page
- open IDEA settings, Plugins tab, select 'Install plugin from disk...' and point it to the downloaded file
The plugin starts working immediately. There is no configuration.
Once plugin is installed, default shortcut 'Ctrl+Alt+O' will work same as before except the order of imports will not be changed.
Note that 'Optimize imports on the fly' option is not compatible with this plugin and uses default behavior that performs reorder. To achieve automatic cleaning of unused imports (like i.e. Eclipse does), install Save Actions and configure it to 'Organize imports'.
Any bug reports or suggestions should be made via github issues.