TheTonsOfCode
TheTonsOfCode

Reputation: 85

How do I change method code formating in NetBeans

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

Upvotes: 0

Views: 143

Answers (1)

Dharmesh Rupani
Dharmesh Rupani

Reputation: 1007

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

Upvotes: 1

Related Questions