Skip to content

Javascript editor formatting: indentation issues #2207

Description

@mblub

Hi. I am using Eclipse with WTP, downloaded from Eclipse site sometime early August 2026:
Eclipse info:
Version: 2026-06 (4.40.0)
Build id: 20260604-0653
WWD info:
Wild Web Developer HTML, CSS, JSON, Yaml, JavaScript, TypeScript, Node tools 1.4.0.202511281851

I am mostly using default settings, except for the following changes in Settings -> JS/TS -> JavaScript -> Formatter:

  • Number of spaces used for each indentation level: 2
  • Convert tabs to spaces: checked

Both of these settings appear to be ignored entirely when editing javascript files. If I allow the editor to auto-indent (using the "Smart" indentation mode), it will try to put tabs in, not spaces. Likewise if I select several lines and press the tab key, I would expect it to insert 2 spaces at the beginning of each line, but instead I get lines with tabs in them.

Desired behavior is as follows:

  • Any time a line is to be indented one level more, 2 spaces should be added to the beginning of the line (no tabs at all)
  • Any time a line is to be indented one level less, 2 spaces should be removed from the beginning of the line

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions