I don't know about automatic file save. that said -- I don't use this -- but there is 'Tools->Options->Editor->On Save. Visit that tab there is a check box called Organize Imports.
Maybe that does it? (mine is off; never used this) HTH On Fri, Jan 24, 2025 at 9:02 AM Bradley Willcott <optusprepa...@gmail.com> wrote: > Hi there. > Try this: Menus -> Source/Organise Imports. > > Or try this macro that I use: > "fix-imports organise-imports" <- Ctrl+Alt+M I > without the quotes. > > And here is the main one I use: > "fix-imports organize-imports organize-members format" <- Ctrl+Alt+Shift+F > again without the quotes. > > The keys right of the "<-" are the shortcuts I use. > > On 24/1/25 18:48, Code Ranger wrote: > > I use NB 24. Could anyone say if it possible to remove unused imports > > on file save? If not how to do it manually? > > > > Best regards, CR > > > > > > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@netbeans.apache.org > For additional commands, e-mail: users-h...@netbeans.apache.org > > For further information about the NetBeans mailing lists, visit: > https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists > >