java - Can I set IntelliJ to auto indent the code body? -


question 1: can intellij set indent code body automatically upon making new line?

here example of mean:

i have method:

    public static void main(string[] args)         {             system.out.println("hi there.");         } 

upon hitting return key after typing expression, this:

    public static void main(string[] args)         {             system.out.println("hi there.");         // new line aligns braces.         } 

i this:

    public static void main(string[] args)         {             system.out.println("hi there.");             // new line aligns preceding line         } 

i haven't been able locate option anywhere under settings make default behavior. exist , missing or looking unicorn?

question 2: there option have code body indented default? if so, can found?

example:

upon using "reformat code..." command, this:

    public static void main(string[] args)         {         system.out.println("hi there.");         // code body realigned braces         } 

is possible set intellij this, , if so, can find option?:

    public static void main(string[] args)         {             system.out.println("hi there.");             // code body indented braces         } 

that thing cannot seem find in settings options.

any great. time.

you should use next line, each shifted option:

enter image description here


Comments

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -