aganm
aganm

Reputation: 1369

How to turn off auto space before '{' in VS2016 C#?

Everytime I write code that is followed by an opening bracket, VS2016 puts a space before the bracket.

public void MyFunction() { };
//......................^....

I want it to look like

public void MyFunction(){ };

I disabled every single auto-spacing option in the the c# text-editor options and I can't get this working. Where is this option hiding?

Upvotes: 0

Views: 848

Answers (2)

Razvan Dumitru
Razvan Dumitru

Reputation: 12452

Just for the record, you also have per language spacing possibilities that you might review.

Later edit: OP said that "I disabled every single auto-spacing option in the the c# text-editor options". Maybe someone will need this panel too. And it cannot be posted as a comment.

Per language spacing formatting

Upvotes: 2

NibblyPig
NibblyPig

Reputation: 52942

Did you disable pretty listing? This should stop your code auto re-formatting.

Screenshot of Options dialogue

Upvotes: 2

Related Questions