How to de-indent chunk of code quickly?
Asked Answered
P

3

11

How to do the opposit of indenting chunk of code in Netbeans?

Indenting multiple lines of code, I can select and use Tab key to achieve.

How can I do the reverse of this quickly, not by doing it line by line?

Even better, is there a way to format all the code? Somewhere I used in Dreamweaver before..

Pomp answered 25/10, 2012 at 4:9 Comment(0)
J
24

to format all the code in NetBeans, press Alt + Shift + F

If you want to indent lines, select the lines and press Alt + Shift + right arrow key

and to unindent, press Alt + Shift + left arrow key

Jasik answered 25/10, 2012 at 4:17 Comment(0)
D
4

shift+tab should unindent the current line if none is selected, or multiple lines if they are.

ctrl+shift+F7 will get NB to format highlighted code.

Destined answered 25/10, 2012 at 4:18 Comment(0)
N
0

Open "Tools" -> "Options" -> "Keymap", then look for the action called "Re-indent Current Line or Selection" and set whatever shortcut you want.

Naples answered 11/4, 2014 at 10:35 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.