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 134324 - Editor messed up tabs (again)
Summary: Editor messed up tabs (again)
Status: RESOLVED FIXED
Alias: None
Product: editor
Classification: Unclassified
Component: Formatting & Indentation (show other bugs)
Version: 6.x
Hardware: Macintosh Mac OS X
: P3 blocker (vote)
Assignee: issues@editor
URL:
Keywords:
Depends on: 90403
Blocks:
  Show dependency tree
 
Reported: 2008-05-01 12:25 UTC by tjahnsen
Modified: 2008-10-01 09:09 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description tjahnsen 2008-05-01 12:25:16 UTC
I have assigned my IDE to use Tab-characters (not spaces) of size 4. After a lot of weird behaviour in versjons 5-5.5 and 6.0 candidates (It displayed 
existing files with tabs as 8 long, and pressing Tab inserted 4 spaces, and pressing Tab again replaces with one Tab 8 long), it finally started working pretty 
well in NetBeans 6.0: Pressing Tab inserted a Tab character 4 long in all types of documents, and the Format command used Tabs 4 long for indentation.

Now in NetBeans 6.1, my Tabs are all over the place again. It works as it should in Java files, but in JSP files it displays existing Tabs as 8 long, and 
pressing Tab once inserts 4 spaces, and pressing Tab again replaces the first spaces with one Tab 8 long. Choosing "Source->Reformat" replaces my Tabs 
with indentation of 4 spaces. In JavaScript and CSS files it's even weirder - my existing Tabs are shown as 8 long, but when I press Tab, it inserts 2 spaces, 
and it doesn't replace them with 1 Tab if I press it out to 4 or 8.

These settings were imported from 6.0. Will the settings stick better if I recreate them from the beginning?

Are Tab characters really that hard? My other text editors set Tab characters (not spaces) and Tab length, and works fine. Do I have to use an external 
editor for text editing, and just do building in NetBeans?
Comment 1 Vitezslav Stejskal 2008-05-04 17:46:46 UTC
Hi, we are really sorry for this. The mess is mostly caused by problems in the settings infrastructure, which should
finally be resolved in 6.5 (issue #90403 and related). There is also issue #132411 describing your observations with 2
spaces inserted instead of 4 when editing some languages (those based on GSF framework).
Comment 2 Vitezslav Stejskal 2008-10-01 09:09:16 UTC
Both 132411 and particularly 90403 have been fixed and the settings should now work correctly for all languages.