Reputation: 169
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
}
Upvotes: 3
Views: 2003
Reputation: 12938
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.Upvotes: 5
Reputation: 1156
How to configure code style for a language:
https://www.jetbrains.com/help/idea/2016.2/configuring-code-style.html
Upvotes: 0