如何删除IntelliJ IDEA的未使用的导入上犯? [英] How to remove unused imports in Intellij IDEA on commit?

查看:2686
本文介绍了如何删除IntelliJ IDEA的未使用的导入上犯?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有办法去除的IntelliJ IDEA未使用的导入上犯?

Is there a way to remove unused imports in Intellij IDEA on commit?

这不是很理想的做手工,<大骨节病> CTRL + <大骨节病> ALT + <大骨节病> 0 帮助,但它仍然是手工。

It is not very optimal to do it manually, CTRL + ALT + O helps but it's still manual.

推荐答案

当你提交,勾选优化进口右边选项。直到你改变它,这个将成为默认。

When you commit, tick the Optimize imports option on the right. This will become the default until you change it.

使用格式化code 选项以及我preFER。

I prefer using the Reformat code option as well.

这篇关于如何删除IntelliJ IDEA的未使用的导入上犯?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆