I know Visual Studio can auto format to make my methods and loops indented properly, but I cannot find the setting.
In the default configuration for Visual Studio Code, the command can be run using the shortcut Alt+Shift+F. To format a range, in an already opened project, open the document that you want to modify, select the specific range to format, right-click, and select Format Selection.
PDT can auto-format your code according to set standards in order to make it easily navigable and readable. Your code will be automatically formatted according to the settings defined in the PHP Formatter Preferences page, accessed from Window | Preferences | PHP Formatter.
To format a selection: Ctrl+K, Ctrl+F
To format a document: Ctrl+K, Ctrl+D
See the pre-defined keyboard shortcuts. (These two are Edit.FormatSelection
and Edit.FormatDocument
.)
On macOS, use the CMD ⌘ key instead of Ctrl:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With