Skip to content

Can we switch default "editor.tabSize" from 4 to 2 for indentation? #41200

@trivikr

Description

@trivikr

I noticed that VSCode adds default editor.tabSize as 4
Is there a reason for doing this?

I went through some popular JavaScript projects, and noticed that all of them use 2 spaces for indentation:

When it comes to TypeScript projects, they also use 2 spaces for indentation:

Only Microsoft projects seem to use 4 spaces for indentation (may be because of C# influence?):

I noticed that popular JavaScript formatters/standards use 2 spaces for indentation:

Is the value of editor.tabSize 4 because VSCode is used for other languages (like Python) where 4-spaces is a standard?
If yes, can language specific indentation setting can be created (say javascript.tabSize)?

Metadata

Metadata

Assignees

Labels

javascriptJavaScript support issues

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions