Zia ur Rehman
Zia ur Rehman

Reputation: 329

Modify auto-format code settings in Visual Studio

At my current job there are some coding guidelines that every programmer has to follow. In those guidelines there are some guidelines related to code formatting. Like there must be a space after 'if' statement e.g. if (args) and curly bracket should be on next line not on same line as 'if' statement.

//Wrong
if (args){  

//Correct
if (args)
{

I want to auto-format (Ctrl+K , Ctrl+F) option in visual studio to follow these guidelines automatically. I tried to find options in visual studio to configure auto-formatting to follow these guidelines. But couldn't find anything. So, Is there some way to do this in visual studio or any other way will also be helpful.

Upvotes: 1

Views: 2238

Answers (1)

Ofek Shilon
Ofek Shilon

Reputation: 16109

Tools \ Options \ Text editor \ C/C++ \ Formatting. Specifically 'Spacing'.

Upvotes: 1

Related Questions