Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6355761
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T22:49:45+00:00 2026-05-24T22:49:45+00:00

Surely an IDE as powerful as NetBeans isn’t this clueless, but as I’m just

  • 0

Surely an IDE as powerful as NetBeans isn’t this clueless, but as I’m just typing out code, here is how it’s formatting it:

$(document).ready(function() {
    if (someVar > 2)
        {
            complain('that is not how you indent braces');
        }
        else if (someVar == -1)
            complain('this is not right either!');
        else
            {
                complain('but it did auto outdent the else which is smart');
                complain('smart indeed');
            }
});

How can I fix this so it formats as such:

$(document).ready(function() {
    if (someVar > 2)
    {
        // this is how it's done
    }
    else if (someVar == -1)
        // this is right
    else
    {
        // correct
    }
});
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T22:49:49+00:00Added an answer on May 24, 2026 at 10:49 pm

    Code formatting was not an available feature in the earlier releases of NetBeans, but was added into the program with the release of NetBeans 7 (I believe). Try going to Tools -> Options -> Editor -> Formatting and see what options you have available, because that is where you would be able to add code formatting, if you could at all.

    If that doesn’t solve the issue, I would recommend doing the following (in no particular order).

    • Check their docs / support page: http://netbeans.org/kb/index.html
    • Post a question on their forum.
    • Email their tech support.
    • File a support ticket on their site.
    • Ask the good folks at https://superuser.com/ (they are
      really good at modding software to work for them, not against them.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Here's an easy one, surely someone knows this off the top of their head...
Surely an easy problem, but I can't get is solved... I just want to
This way surely works,but it calls UNIX_TIMESTAMP 2 times: mysql> select UNIX_TIMESTAMP(now()) - UNIX_TIMESTAMP('2009-09-23
I have seen other posts on this subject, but no valid solutions. Surely this
I'm using NetBeans as my IDE. Whenever I have some code that uses another
This surely is a noob question, but I can't find an answer in Doxygen
This is surely obvious but I'm stuck on it. I want to have something
this is surely a basic question for most of you but it still giving
surely this question has beed debated thousand of time, but I do not find
Surely this is possible? I have been hunting through PyQt tutorials and documentation but

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.