This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 198016

Summary: Tabs should not be displayed as whitespace
Product: editor Reporter: jostster
Component: Painting & PrintingAssignee: Miloslav Metelka <mmetelka>
Status: RESOLVED WONTFIX    
Severity: normal CC: ProjectOrc
Priority: P3    
Version: 7.0   
Hardware: Macintosh   
OS: Mac OS X   
Issue Type: ENHANCEMENT Exception Reporter:
Attachments: different background color for spaces and tabs in vim editor

Description jostster 2011-04-22 17:34:26 UTC
Product Version = NetBeans IDE 7.0 (Build 201104080000)
Operating System = Mac OS X version 10.6.7 running on x86_64
Java; VM; Vendor = 1.6.0_24
Runtime = Java HotSpot(TM) 64-Bit Server VM 19.1-b02-334

In 6.9.1 you were able to have "spaces" in the editor show up as a different color or show up as underlined. In 7.0 "tabs" as well as "spaces" show up as that color. Tabs should not be considered as whitespace and should have their own setting in the editor menu.

Currently I have spaces set to show as a grey underline and would like tabs to not show as an underline. Maybe a dotted line or an arrow. When people have strict coding standards at their company to use tabs instead of spaces it gets very confusing looking through code with a bunch of underlines which should be triggered for spaces and not tabs & spaces.

To duplicate this issue go to
Preferences -> Fonts & Colors -> Syntax -> Whitespace and set a color or underline option. Next open a file and add a few spaces as well as tabs. They are treated as the same character.
Comment 1 johnjamesjacoby 2011-04-24 03:00:46 UTC
I actually always configure my "whitespace" exactly the same as Jostster does. This issue has been around for as long as I've been using Netbeans (6.7). When I first started using Netbeans, I was running nightly builds on a Windows machine. Fast forward to me using Netbeans 7.0 on a Mac, and same situation.

Guessing to what causes this, the formatting changes when Netbeans imports settings from a previous installation. I haven't tried a vanilla install of Netbeans 7 to know for sure, but once settings are imported this never seems to fix itself. If it isn't because of the importer, then this is a regression that has come and gone over the past 2 years or so.

If there's a 7.0.1 in the pipeline, it'd be great for this to make it in.
Comment 2 johnjamesjacoby 2011-09-06 06:32:07 UTC
Any updates on this?
Comment 3 Miloslav Metelka 2012-05-30 08:47:31 UTC
To highlight TABs you may currently use menu View->Show non-printable characters.
If it does not cover your needs can you provide a picture of your idea of an extra TAB highlighting? Thanks.
Comment 4 arekm 2012-12-05 18:15:28 UTC
Created attachment 128920 [details]
different background color for spaces and tabs in vim editor

I also miss ability to set different backgrond color for spaces than for tabs.


Under vim on Linux I can set different background color for spaces and for tabs. This is so much readable than netbeans "show unprintable characters".

Would like to see similar alternative in netbeans.
Comment 5 Martin Balin 2016-07-07 07:26:08 UTC
This old bug may not be relevant anymore. If you can still reproduce it in 8.2 development builds please reopen this issue.

Thanks for your cooperation,
NetBeans IDE 8.2 Release Boss