I am using Intellij for Java development, but I prefer C# like coding style. How to format like C# code style? For example:
if()
{
/// do something
}
else
{
//// do something
}
Go to
File -> Settings -> Editor -> Code Style -> Java
Wrapping and Braces tab.Braces placement, there's a drop-down called Others, change it to Next Line. (by default it is End of line). This will change bracer placement for all the places other than class and method declaration.Braces placement section(In class declaration, In method declaration) to Next Line also.How to configure code style for a language:
https://www.jetbrains.com/help/idea/2016.2/configuring-code-style.html