I'm using Webstorm to write my code.
my code is a mess now,
how can I arrange it nicely and do text Indent?
You should select Code | Reformat code
in main menu. Also you could control how your code will be reformatted in Settings | Code Style
.
Additional info can be found in WebStorm help
For Mac:
Command + Alt + L
for "Reformat Code".
Ctrl + Alt + I
for "Auto-indent line(s)".
You can also select a block of text with the cursor and use tab or shift+tab to move the block to the right and to the left, respectively.
You can edit how your code looks further by going to Preferences | Editor | Code Style
.
If you are on Windows then:
1.Select the area of code you want to intent (use Ctrl+A
to select all lines ).
2.Now press Ctrl+Alt+I
to auto-intent.