37

I am using JetBrains WebStorm IDE. But I think there is not shortcut to autoformat (beautify) the code. In Netbeans, its CtrlShiftF command which formats the whole file. Is there any command for this? Do I need to install any plugin or something to enable this function?

3 Answers 3

74

Code | Reformat Code... (Ctrl+Alt+L):

enter image description here

Keyboard shortcut can be changed in File | Settings | Keymap:

enter image description here

If you are not familiar with IDE features yet, use Help | Find Action:

enter image description here

This feature is also documented.

Sign up to request clarification or add additional context in comments.

1 Comment

Thanks. In WebStorm 8 formatting content changed to Alt+F8.
10

Yes.

Opt+Cmd+L (Mac, or whatever your platform combo is)

Or Code > Reformat Code...

Comments

1

Using WebStorm 8.0.4 in Windows the hotkey is (has become?) Alt-F8.

1 Comment

what about Mac?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.