Search code examples
intellij-ideaide

How to optimize imports automatically after each save in IntelliJ IDEA


I want to learn how can I automatically optimize imports after each save as we do Eclipse(save actions).


Solution

  • IntelliJ IDEA offers an option to Optimize imports on the fly in Settings | Editor | General | Auto Import and Optimize imports option in the Commit Project dialog.