sniffingdoggo
sniffingdoggo

Reputation: 406

How to turn off auto indent in Visual Studio 2019? (not VISUAL STUDIO CODE)

enter image description here

I usually use comma , to set the same variable type like the gif above.

But a problem is when I hit Enter after write second variable, the VS breaks the line automatically.

As a formal Atom user, it's a bit tedious because in Atom it doesn't break the line whatever the indent number is. (My current indent number is 2.)

I changed and tested it all of the options inTools > Options > Text Editor > Basic > Tabs, but none of these turn off the breaking line. Even disabling pretty listening won't work.

How do I turn off this feature?

Upvotes: 7

Views: 7455

Answers (2)

Ilya Rabyy
Ilya Rabyy

Reputation: 31

The accepted answer doesn't work in Visual Studio 2019 with Visual Basic. These options on the image aren't even shown in the Options for Basic.

However, when the Pretty listing option is turned off, this behavior ceases.

enter image description here

Upvotes: 3

Mihai Albert
Mihai Albert

Reputation: 1483

Judging by the glimpse of Intellisense and the fact that Enter auto-formats, it looks like you're editing a JavaScript file.

To disable auto-formatting after hitting Enter, go to Tools > Options > Text Editor > JavaScript/TypeScript > Formatting > General and toggle Format completed line on Enter to unchecked:

enter image description here

Upvotes: 6

Related Questions