简体   繁体   中英

Visual Studio 2019 is inserting tabs on enter when it should be using spaces

I'm having a problem where I press enter at the end of the line and the cursor appears on the next line. When you type your first character the editor should be inserting spaces for the indent but it is inserting tabs. Under 'Options | Text Editor | All Languages | Tabs' I have 'Insert spaces' and Tab size and Indent size are 2. Under 'Options | Text Editor | C/C++ | Tabs' I have Smart Indenting and 'Insert spaces' with Tab size and Indent size are 2.

Am I missing another option?

So what I discovered is kind of embarrassing. Someone in our group decided to play a joke and created a .editconfig file. I didn't realize this and wasn't even looking for it. So maybe look to see if that might be it. But the link 'doug' provided is also very important. That one caught me another time.

Thanks everyone.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM