Code > Optimize Imports will provide you the behavior you are after. If you want to adjust the settings you can so via Settings > Editor > Auto Import.

Code > Optimize Imports will provide you the behavior you are after. If you want to adjust the settings you can so via Settings > Editor > Auto Import.
