How to optimize imports automatically after each save in IntelliJ IDEA

前端 未结 4 1596
孤街浪徒
孤街浪徒 2020-12-13 23:13

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

4条回答
  •  时光取名叫无心
    2020-12-13 23:26

    The mentioned answer works, but there is also the Intellij "save actions" plugin available from the JetBrains plugin repository that does that (as well as other things): Intellij Save Actions Plugin.

    Installation

    File > Settings > Plugins > Browse repositories... > Search 'Save Actions' > Category 'Code tools'

    Disclaimer

    I'm the plugin developer

提交回复
热议问题