Skip to content

Auto indent: Allow to indent with spaces but with different size from tabSize #135058

@fathomssen

Description

@fathomssen

Hi

In our project, we use indentation by two spaces nowadays but in the past, it was common to mix tabs (tab-size 8) and spaces.

So for example, if you want to indent ten spaces, you just use ten spaces these days. But in the past, one tab plus two spaces have been used.

To display old code correctly, we have to set editor.tabSize to 8. But this also means that auto-indentation will indent with eight spaces. This is not desired as we want to indent with two spaces only.

So my suggestion is to add a new variable spaceIndentSize (?) which may default to tabSize. This variable is then considered for indenting with tabs.

Cheers
Freddy

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions