Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to de-indent chunk of code quickly?

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

like image 244
Hao Avatar asked Oct 25 '12 04:10

Hao


2 Answers

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

like image 176
tanyehzheng Avatar answered Sep 28 '22 01:09

tanyehzheng


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.

like image 26
Sophistifunk Avatar answered Sep 28 '22 02:09

Sophistifunk