I was programming in VS2019 this morning before going about my day. When I sat down in the evening to keep programming, I realized that it has suddenly been placing spaces instead of tabs! My preferences are set for every language to place tabs instead of spaces, and has been doing so in previous days. I updated VS to make sure, but the problem persists - regardless of my preference settings, out of nowhere spaces are being placed instead of tabs.
PS: I am aware that this question has already been asked here, but their solution was to update VS - which did not change anything for me.
I found the solution! In the options, go to Text Editor > Advanced and turn off "Use adaptive formatting". It was overwriting my preferences based off of the already-existing formatting of a given file
Try all this (solved my problem):
Tools -> Options -> Text Editor -> Advanced -> turn off "Use adaptive formatting"
Tools -> Options -> Text Editor -> All Languages -> Tabs -> Keep tabs
Tools -> Options -> Text Editor -> C# -> Tabs -> Keep tabs
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With