Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
fathomssen opened this issue Oct 14, 2021 · 4 comments
Closed
Assignees
Labels
editor-indent-detection feature-request Request for new features or functionality on-testplan
Milestone

Comments

@fathomssen
Copy link

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

@rebornix rebornix added editor-indent-detection feature-request Request for new features or functionality labels Oct 15, 2021
@rebornix rebornix removed their assignment Oct 21, 2021
@magicus
Copy link
Contributor

magicus commented Oct 25, 2021

This issue relates to (or possibly duplicates) #5394 and #42740.

@github-actions github-actions bot locked and limited conversation to collaborators Jan 31, 2022
@alexdima alexdima self-assigned this Nov 16, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
editor-indent-detection feature-request Request for new features or functionality on-testplan
Projects
None yet
Development

No branches or pull requests

5 participants
@rebornix @alexdima @magicus @fathomssen and others