30 Days with IntelliJ IDEA. Code Style and Formatting

It’s a great tradition to learn new things about your favourite IDE each week. Just to keep it going we publish this article from our 30 Day Guide about fundamental features of IntelliJ IDEA. Today we will talk about the code style and how the IDE can help you with that.

As you know, code style defines how your code looks in terms of indents, spaces, wrapping, blank lines, and statements order. Consistent code style helps to make it easier for your team to read and understand it. IntelliJ IDEA provides built-in tools that help you configure code style for your project and apply it to the code automatically.

Did you know?

Did you know that in addition to Reformat code IntelliJ IDEA also provides Auto-Indent Lines action? This action helps you to correct indents for the current line and sometimes is a better option than Reformat Code because it does not require you to select anything. Just press Alt + Ctrl + I (Alt + Cmd + I for Mac) shortcut and it will quickly fix indents for the current line.

Read the complete article to learn more on the code style and formatting in IntelliJ IDEA.

Develop with Pleasure!

About Andrey Cheptsov

Andrey Cheptsov is IntelliJ IDEA product marketing manager at JetBrains. He's passionate about productivity, programming languages and tools.
This entry was posted in Tips & Tricks and tagged , . Bookmark the permalink.

One Response to 30 Days with IntelliJ IDEA. Code Style and Formatting

  1. meo says:

    Maybe relevant: I discovered that it is really good to customize Darcula Java colors so I can easily see called inherited methods, method parameters, reassigned parameters, enums…

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">