Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

IntelliJ IDEA code reformat options

When I press Ctrl + Alt + L, IDEA removes unused import. I want to turn this feature off, leave the unused imports there. Where can I affect this setting?

like image 684
ryskajakub Avatar asked Feb 18 '12 22:02

ryskajakub


1 Answers

First check:

File | Settings | Editor | Formatting | Show "Reformat Code" dialog

Then when you hit Ctrl + Alt + L pop-up dialog will appear.

Uncheck Optimize imports and check Do not show this dialog in the future. Hit Enter or click Run. That's it!

like image 106
Tomasz Nurkiewicz Avatar answered Sep 21 '22 07:09

Tomasz Nurkiewicz