However, if you can tell me how to get visual studio to do this, then I would be incredibly grateful.
In my opinion mixing spaces and tabs is completely fine because they are for different things. Tabs for indentation, and spaces for alignment.
Why no auto indent? Because the editor doesn't have enough information to do it correctly (e.g. perhaps you are about to paste some code which is already indented as you want it). I am not saying you should have the same preferences as me, but I am pretty happy with this behaviour, and perfectly ok with pressing tab after enter (or even pressing space 4 times - again, this is just my personal preference and I know that there was a time in my life when I would have looked at this with disgust).
So - how do I configure VS to do what I want?
https://stackoverflow.com/questions/737222/turn-off-auto-for...
You won't get much more help unless you describe what you've tried and why it didn't work for you. As far as I can tell the settings you're looking for aren't very hidden.
- Pressing enter results in just adding a newline, without copying the whitespace from the previous line OR - Pressing enter results in addine a newline, copying the whitespace, but replacing spaces with tabs on the new line
I guess if someone could once show how to make it so adding a newline to:
<tab><space><space><space><space>foo
(when configured with 4 space tabs) I get: <tab><space><space><space><space>foo
<tab><space><space><space><space>
Instead of: <tab><space><space><space><space>foo
<tab><tab>Generally speaking, I have VS Code configured how I want it and will use that over 95% of the time... even for C# projects.
I’m not sure if the GP is asking for what you seem to be referring to. I thought of that request as the keys should insert the characters they stand for. Are you thinking only about multiple spaces used instead of a tab? Spaces are routinely used to increase readability in code. Even something as simple as comparisons in loops are more readable with spaces around the symbols. There are many other cases where spaces are used as spaces.
{
<tab>foo(arg1
<tab> ,arg2
<tab> );
}
Though I think this example is less likely to be controversial: {
<tab>bar(); /* Some comment
<tab> * across two lines */
}
But it is all fine, because I don't really feel like I need to defend my preferences - that is the nice thing about them.