8
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

IntelliJ IDEA でimport文の自動削除をオフにしたい

Posted at

import文が自動で消えて辛い

使用していないimport文が勝手に消えてしまうために、import文をコピペしたのに消えてしまったり、クラスから先に書かなければ行けなくなったり。

IntelliJでimport文の自動削除をオフにするやり方のメモです。

  • メニューの「IntelliJ IDEA」から「Preferences」
  • Editor > General > Auto Import
  • Optimize imports on the fly のチェックを外す

これでOKです。もう飛んでいかなくなります。
参考画像はJava/ScalaのOptimize imports on the fly。
image.png

8
4
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
8
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?