WebStorm 2024.2 Help

Tabs and Indents

Configure code style for indents, TAB and SPACE characters.

Item

Description

Use tab character

  • If this checkbox is selected, tab characters are used:

    • On pressing the Tab key

    • For indentation

    • For code reformatting

  • When the checkbox is cleared, WebStorm uses spaces instead of tabs.

Smart tabs

  • If this checkbox is selected, the part of indentation defined by the nesting of code blocks, is made of the tabs and (if necessary) spaces, while the part of indentation defined by the alignment is made only of spaces.

  • If this checkbox is cleared, only tabs are used. This means that a group of spaces that fits the specified tab size is automatically replaced with a tab, which may result in breaking fine alignment.

The Smart tabs checkbox is available if the Use tab character checkbox is selected.

Tab size

In this field, specify the number of spaces included in a tab.

Indent

In this field, specify the number of spaces to be inserted for each indent level.

Continuation indent

Specify the indentation for lines that continue from the previous line, making it clear that they are part of the same statement or block of code. Continuation indents are used when a single statement is too long to fit on one line.

Keep indents on empty lines

If this checkbox is selected, WebStorm will keep indents on the empty lines as if they contained some code.

If this checkbox is cleared, WebStorm will delete the tab characters and spaces.

Last modified: 10 July 2024