Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 121881

Summary: indentation amount tied to tab size
Product: [Tools] CDT Reporter: Richard van der Hoff <richardv>
Component: cdt-coreAssignee: Project Inbox <cdt-core-inbox>
Status: RESOLVED DUPLICATE QA Contact:
Severity: normal    
Priority: P3    
Version: 3.0.1   
Target Milestone: ---   
Hardware: PC   
OS: All   
Whiteboard:

Description Richard van der Hoff CLA 2005-12-22 08:25:36 EST
This feels like it ought to be a dupe, but I've not been able to find it if so.

The cdt editor indents code after opening a brace:

if(foo) {
    /* this code is indented */
}

- which is great, except that the amount of indentation is controlled by "displayed tab width"; essentially, no distinction is made between tabs and indents.

As noted on bug #73104 (which is essentially this bug for the JDT), whatever your views on how indentation ought to be done, having a single setting for both indentation and tab width is simply too inflexible for a great deal of existing code.

Please could we have separate settings for tab width and indentation size.
Comment 1 Max CLA 2006-01-12 11:17:25 EST
I am having a terribly hard time trying to set up tabs and indentation in Eclipse... 

Here's what I am trying to do:

Each indentation level must be 4 spaces and a tabs must be 8 spaces

Please could we have separate settings for tab width and indentation size.

Thanks
Comment 2 Peter Ledbrook CLA 2006-01-24 05:00:25 EST
Looks like a duplicate of bug #53994
Comment 3 Richard van der Hoff CLA 2006-01-24 05:55:25 EST
It may well be now, although the original symptoms of that bug #53994 don't really match this. It looks to me like #53994 has evolved into a duplicate of this one...
Comment 4 Anton Leherbauer CLA 2006-10-12 03:28:37 EDT

*** This bug has been marked as a duplicate of 53994 ***