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?.

3 comments
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.

2
Comment actions Permalink

Thanks, worked perfectly.

0
Comment actions Permalink

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

1

Please sign in to leave a comment.