Code formatter

CodeLobster IDE has several predefined code formatting schemes, including specific for many popular frameworks. To format a fragment of code, select it and press Ctrl+Alt+F or select Tools | Code Formatter | Format main menu item.

[Note]Note

Code formatting is a part of CodeLobster IDE - Professional version.

CodeLobster IDE can automatically formats code when copy or paste - enable Auto format option in Tools | Preferences | Editor Settings.

Select one of the following schemes:

You can also set a custom scheme using the following options:

Options

Description

CSS/JavaScript

CSS Spaces

  • Align CSS properties

  • Put CSS properties on a new line

Wrapping and bracers

  • Open curly bracket on a new line

  • Close curly bracket on a new line

  • New line after open curly bracket

HTML

  • Open tag on a new line

  • Close tag on a new line

  • New line after open tag

PHP

Other

  • Align arrays values

  • Align assignments

Spaces

  • After if, while, etc

  • Around binary operators

  • Before left brace

Wrapping and Bracers

  • Else & Else-If structures on a new line

  • Other control structures on a new line

  • Class open curly bracket on a new line

  • Function open curly bracket on a new line

  • Control structures open curly bracket on new line

  • Other open curly bracket in a new line

  • Close curly bracket on a new line

  • New line after open curly bracket

[Tip]Tip

To restore settings to their default values, press the Default button.