Code Formatting in Netbeans 6.8

April 17th, 2010 by Usha Informatique Team Leave a reply »

In any project in web world, code formatting plays a key role during the development of the project as it makes the code review process very simple at least from readability point of view.

The more readable your code is the more easy it is to review it. Now, how to format the code in Netbeans 6.8.

There are two levels at which formatting can be performed in Netbeans 6.8.

1) At a global level – It’s applicable across all the projects for which netbeans would be used

2) At a project level – It is specific to a particular project

For the first option

a) Go to Tools->Options->Editor-> Formatting

b) Please select the language for which you want to apply the formatting, for me it is PHP

c) Select the category, which could be Tabs and Indent or Braces

d) Put your option for Tabs and Indent in terms of tabs or if you choose to go with spaces

e) For braces, you can select new line, same line or preserve existing

This is pretty useful as if you are aware of it, it saves lot of effort from your end.

Enjoy working with Netbeans 6.8 !!



  1. Great site. A lot of useful information here. I’m sending it to some friends!

  2. Keep posting stuff like this i really like it

  3. I found this article through Facebook (one of my friends posted it). After reading, I of course clicked Like and also reshared it myseld. More power.

  4. Keep the good information comming, we need more authors like you!

  5. forex robot says:

    Great site. A lot of useful information here. I’m sending it to some friends!

  6. 黑帽SEO says:

    Nice content. Thank you for your information.

  7. Very good journey and experience!

  8. nba Jerseys says:

    Nice article. Thank you for this info

  9. dog symptom says:

    I completely agree with the above comment, the internet is with a doubt growing into the most important medium of communication across the globe and its due to sites like this that ideas are spreading so quickly.

  10. While this subject can be very touchy for most people, my opinion is that there has to be a middle or common ground that we all can find. I do appreciate that youve added relevant and intelligent commentary here though. Thank you!

  11. Cho Yung Tea says:

    My day was kind of frazzled so I was looking for something interesting and this worked.

  12. WP Themes says:

    Nice post and this post helped me alot in my college assignement. Thank you seeking your information.

  13. restaurants says:

    I truly enjoyed your article. It is extremely educational and useful. I will back to check on upcoming posts

  14. I’ve read some good stuff here. Definitely worth bookmarking for revisiting.

  15. Thanks for taking the time to discuss this, I feel strongly about it and love learning more on this topic. If possible, as you gain expertise, would you mind updating your blog with extra information? It is extremely useful for me.

  16. This is very good article, I am very interested in its topic and read them was a pleasure.

  17. I agree with the author that we need to share the knowledge we gain!. . . . . .

  18. I truly enjoyed this. It is very educational and useful. I will return to check on upcoming posts

  19. Good dispatch and this fill someone in on helped me alot in my college assignement. Say thank you you on your information.