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 3483144
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T10:38:23+00:00 2026-05-18T10:38:23+00:00

I just started to use NetBeans, and am trying to work out how to:

  • 0

I just started to use NetBeans, and am trying to work out how to:

  1. Make it so that trailing whitespace is removed on save. I know that you can invoke it manually, but it’s annoying if you forget. Can it be done automatically on save? I want this done because it keeps the code neat, because it’s really annoying when you’re moving through code and the text cursor goes all over the place because of trailing whitespace you don’t see, and because trailing whitespace has unintended effects on HTML layouts and other stuff.

  2. Make it so that tabs are automatically made into 4 spaces while you’re typing rather than converting on save, or, worse, only when manually invoked.

  • 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-18T10:38:24+00:00Added an answer on May 18, 2026 at 10:38 am

    [Original] For your first question, how to set NetBeans to remove trailing whitespace, the answer is that there is no setting (at the moment) to control that. It happens automatically, but not to every line. Whitespace is only removed from the lines you edit (or from the entire file if invoked manually). See Petr Pisl’s blog entry titled “Removing trailing spaces” for a more complete explaination. (Note that even though he is blogging about NetBeans’ PHP features, this particular feature applies to the basic editor shared by all NetBeans supported languages.)

    [Update] This feature has been made available as of version 7.0, as pointed out by others in comments and answers below.

    For your second question, set the editor to automatically make tabs into spaces as you type, you can find that setting in the Editor Formatting options:

    1. Click on the Tools menu, and choose Options
    2. Click on Editor in the top row of icons
    3. Click on the Formatting tab
    4. In the Language field, ensure that All Languages is selected
    5. In the Category field, ensure that Tabs And Indents is selected
    6. Check the box for Expand Tabs to Spaces
    7. For each additional language that is available in the Language field, check that either Override Global Options is not checked, or that Expand Tabs to Spaces is also checked for that language.
    8. Click OK

    That will make sure that when you hit the tab key the specified number of spaces is inserted rather than a tab character. As above with whitespace removal, any existing tabs in the file are left as-is unless you invoke the manual command to change the entire file. (Moreover, even if you edit a line with tabs on it–leaving the tabs in place–the editor will not convert them to spaces. Only new instances of hitting the TAB key are controlled by this option.)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've just started to use Greasemonkey and am trying to make a userscript that
I'm a fairly experienced Java user, but I've just started trying to use NetBeans
I just started to use VS 2008 Express. I noticed that I cannot add
I just started out with a new site and I decided to use DOMImplementation
I am trying to use this in my page class. I only just started
I just started to use the PHP symfony framework. Currently I'm trying to create
recently I just started to use python3 and realised that there alot of changes
I've just started to use devise today and I want to know if I
I have just started to use Apache Maven. Now I would like to make
Just started something related to video. It would really help if we can use

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.