Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio - Code Formatting (curly braces)

I am in trouble with the Visual Studio 2013 code formatting. In particoular I have the following problem: when I cut and paste some C++/C# code it is re-formatted as follow:

int main() {
  ...
}

While I would prefer the following indentation (please note the position of the opening curly brace):

int main()
{
  ...
}

Where can I find the proper indentation setting?

like image 694
Nick Avatar asked Oct 19 '22 10:10

Nick


1 Answers

Tools -> Options -> Text Editor -> C/C++ -> Formatting -> New Lines and choose what suits you. Then, do the same thing for C# settings.

like image 73
Zereges Avatar answered Jan 04 '23 05:01

Zereges