vscode icon indicating copy to clipboard operation
vscode copied to clipboard

Unexpected 2-spaces indent detection despite of predominant 4-spaces usage

Open mirunaGeo opened this issue 7 months ago • 2 comments

  • VS Code Version: 1.95
  • OS Version: Linux x64 5.15.0-139-generic

When Editor: Detect Indentation is enabled and there are some areas indented using 2 spaces, VSCode detects a 2-space indentation even when the file is mostly indented with 4 spaces.

Image

This doesn't happen for other pairs of values such as {3, 6} or {4,8}. Is there any reason for choosing 2 spaces over 4? Why does this happen only for the {2, 4} pair?

mirunaGeo avatar May 15 '25 17:05 mirunaGeo

Thanks for creating this issue! It looks like you may be using an old version of VS Code, the latest stable release is 1.100.2. Please try upgrading to the latest version and checking whether this issue remains.

Happy Coding!

Issue persists in VS Code 1.100.2

mirunaGeo avatar May 16 '25 06:05 mirunaGeo