Salar
Salar

Reputation: 5509

Jetbrains reformat(rearrange) code automatically

How Can I reformat(rearrange) my code in phpstorm? is there any shortkey for that or can I do it through Search Everywhere dialog box?

Upvotes: 0

Views: 983

Answers (2)

axiac
axiac

Reputation: 72226

There is a key combination for this action but it depends on your current keymap. For example, on the "IntelliJ Idea Classic (OSX)" keymap the combination is Alt-Cmd-L

Open Settings/Preferences, select Keymap on the left list of categories and search (using the box on the top-right corner of the window) for "Reformat".

It will find you "Reformat Code" and "Show Reformat File Dialog" and you can learn what key combinations they have currently assigned (if any) and/or assign different key combinations for them if you desire.

Upvotes: 1

Steven Stip
Steven Stip

Reputation: 387

on a mac it's command+alt+l and you can probably find this for you here: https://www.jetbrains.com/idea/help/reformatting-source-code.html

Upvotes: 1

Related Questions