Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio 2019 ignoring tab preference

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.

like image 872
Khide Hoskins Avatar asked Jan 20 '20 03:01

Khide Hoskins


2 Answers

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

like image 155
Khide Hoskins Avatar answered Sep 21 '22 17:09

Khide Hoskins


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

like image 21
Jan Macháček Avatar answered Sep 18 '22 17:09

Jan Macháček