Get Off My Lawn
Get Off My Lawn

Reputation: 36351

Auto Format Issue

I have to follow a particular coding standard, and I am having issues with netbeans formatting to one of the standards.

Here is how netbeans is formatting the code:

}else
{

Here is how I need it to format the code:

}
else
{

It does it for both else and elseif. Under Formatting in the Editor options, in the Braces category I have them all set to New Line, so why is it formatting the else and elseif on the same line as the closing brace?

Upvotes: 0

Views: 228

Answers (1)

Joachim Rohde
Joachim Rohde

Reputation: 6045

That's indeed a bit misleading. Under the category "Alignment" there is a group of checkboxes for "New Lines". You need to check there the "else" checkbox.

Upvotes: 1

Related Questions