How to delete all unused imports at once?.

I find myself often deleting unused imports manually, you know, the ones grayed out, at least in the Darcula theme.

Is there any command to delete them all at once?.

Comment actions Permalink

Help | Find Action (remember its shhortcut BTW!) and type 'Optimize imports'. The action will be found for you - remember its shortcut as well!
Other action is 'Reformat Code' - it can both optimize imports an fix formatting for the whole file.

Comment actions Permalink

Thanks, worked perfectly.

Comment actions Permalink

You could use `control + option + O` form make


Please sign in to leave a comment.