Smart Indentation

PHP editor supports smart indentation feature. The editor's cursor is automatically indented on new lines to the desirable position. This is most noticable after {, within if, after ; or :.

Settings

The option is enabled by default. The option can be disabled in Tools | Options | Text Editor | PHP | Tabs.

Smart Indent Features

  • enter
  • { character outdents current line to line up with code block start.
  • } character outdents current line to match block start. If the code is syntactically valid, it also reformats code block.
  • : after case or default makes indentation of the line the same as previous cases within the switch.