I want to start using VS code but this one issue is driving me insane.
The normal behavior I am expecting is that when I am typing and pressing Enter at the end of a line, the new line is created and indented as expected, following the current scope's indentation:
My problem is, when I have inserted 2 newlines (pressed enter twice), or clicked on any empty line, the cursor always jumps back to the beginning and does not adhere to the indentation. In the image below I added a new line and then clicked on line 88 and the cursor automatically moved to the start of the line.
The only setting and suggestions I could find was to change the following setting:
"editor.autoIndent": "full"
. This however did nothing to help with this issue.
The only extensions installed are C#, Razor/Blazor and Code Spell Checker.
Is there any other setting that can be set to fix this issue?
CodePudding user response:
VSCode automatically clears the indent of empty lines as you can see on the image below:
There is an issue open on VSCode's GitHub (see #1), and requests for a Visual Studio-like solution for it (see #2), but it doesn't seem like something that will be implemented soon.