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 detect indentation when pasting on an empty file #156282

Merged
merged 2 commits into from
Oct 24, 2022

Conversation

Balastrong
Copy link
Contributor

This PR fixes #151304.

While working on it I noticed that it does not detect tab size (sets 4 as default) but only space size, and seems to be intentional:

let tabSize = defaultTabSize;
// Guess tabSize only if inserting spaces...
if (insertSpaces) {

I'm mentioning that in case we want to change this behavior as I don't know why originally it has been decided.

@alexdima alexdima added this to the October 2022 milestone Oct 24, 2022
@alexdima alexdima merged commit 526ea7d into microsoft:main Oct 24, 2022
@Balastrong Balastrong deleted the feature/auto-detect-indentation branch October 24, 2022 19:08
formigoni pushed a commit to formigoni/vscode that referenced this pull request Oct 27, 2022
Detect indentation

Co-authored-by: Alexandru Dima <alexdima@microsoft.com>
@github-actions github-actions bot locked and limited conversation to collaborators Dec 10, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Detect Indentation automatically after creating a new file and paste some code into it
4 participants