0

I installed new NetBeans 8.1, and when i want to format code by Alt+Shift+F my code placed in method looks very ugly, like there:

enter image description here

How can I change that code formating to that like i had before in NetBeans 7.4 and on the image there:

enter image description here

  • 1
    http://stackoverflow.com/questions/956900/code-cleanup-in-netbeans – Gelunox Jun 01 '16 at 20:45
  • that is no that I tried also to import settings from my 7.4 NB and that not helped, and I tried also from 8.1 from my friend(He have normal formating like I want to have too) and that no helps too, that must be somewhere else, probably not in tools>options – TheTonsOfCode Jun 01 '16 at 21:08

1 Answers1

1

You can format multiple files/folders at a time! In the Projects window/sidebar, if you select one or more folders or files and press Alt+Shift+F.

NetBeans asks "Recursively format selected files and folders?"

and pressing OK will recursively format all the selected files/folders.

On Mac OS X, shortcut is Ctrl+Shift+F. (note: it's Ctrl and not )

EDIT :-

Open Tools -> Options -> Keymap, then look for the action called "Re-indent current line or selection" and set whatever shortcut you want. It will work.

enter image description here

Dharmesh Rupani
  • 1,029
  • 2
  • 12
  • 22
  • Ok, that works good for methods with "single arguent", but I mean what to do with that white spaces "indent" which i marked by red arrows, tocan change that indent in methods where I use couple of objects, as argument(like on images I added in topic). – TheTonsOfCode Jun 01 '16 at 21:37
  • Ok, thank you that is what I mean, but maybe you know any way to do that same not to current line, or selection, but anywhere I click that do that for all file? – TheTonsOfCode Jun 01 '16 at 22:39