Search code examples
visual-studiovisual-studio-codeauto-indent

Visual Studio Code keeps auto indenting my code to column and I want to know how to change this


Visual Studio Code keeps auto indenting my code to the beginning of the line (column 1) and I want to know how to prevent it from doing this.

Example: 1)I click on a line that's indented with three tabs. The '|' line flashes on the third indent for 2 seconds 2) After 2 seconds, the | repositions itself to the beginning of the line.

However, if I type something within this 2 second mark, it will not reposition itself to the beginning of the line, which tells me that this is some intentional setting.

I suspect it was a combination of hotkeys that turned on this setting and if i could reproduce which keys these were, I would solve the problem.

I'm not sure why this frustrating feature exists or how it was enabled but I would like to learn how to disable it.

How can I disable this setting? I'm not seeing any help online.

Update: I have disabled all Extensions and even then, the problem persists.


Solution

  • Try this setting:

    file -> preferences -> settings -> editor -> editor.autoIndent: true -> false
    

    If that does not help, my next suggestion would be to check tab size and the detect indentation option. I have a hunch either of those could have a role in this after reconsidering the issue you are having.