可以settings-general-auto import-java項,勾選optimize imports on the fly,在當前項目下會自動清除無效的import,而且這個是隨時自動清除的。
參考資料
1、使用idea一次性清理所有java文件中多余導入未使用的包
http://blog.csdn.net/chengsi101/article/details/69389344
2、IntelliJ IDEA開發快捷鍵(IDEA tool Keyboard shutcuts)
http://blog.csdn.net/john_f_lau/article/details/44808159