Jacko
Jacko

Reputation: 88

Automatically adding spaces before semicolon in Visual Studio 2015

I have been using VS2015 for about a year but I have had to reinstall it recently and I can't find the option to automatically add spaces to a expression as soon as a semicolon is entered. I have use it before but just can't find it now.

Example:

before semicolon: A=a+b+myFunction(a,b)

after semicolon: A = a + b + myFunction(a, b);

Upvotes: 2

Views: 1681

Answers (1)

Ionian316
Ionian316

Reputation: 2343

Under TOOLS->Options->C/C++->Formatting, you'll want to have "Automatically format statement when I type a ;" checked.

enter image description here

Upvotes: 3

Related Questions