"Indent with tabs, align with spaces" behavior in Xcode

Originator:demid.itsk
Number:rdar://22285639 Date Originated:14.08.2015
Status:Open (duplicate of 8165023) Resolved:
Product:Xcode Product Version:
Classification:Enchancement Reproducible:Always
 
Summary:
Xcode supports two types of indentation settings: "Spaces" and "Tabs".
The problem is that "Tabs" are unusable in their current condition. It should be prohibited to use tabs like that. I know, that it is a holy-war topic, but let me explain:
If you select "Tabs" as your preferred indentation type, Xcode will always use tabs, no matter if it is indentation or alignment. Indentation consists of whitespace characters from the beginning of the line to the beginning of the current indentation level. Alignment consists of whitespace characters from the current indentation level to the beginning of the text. For instance:
-(void)myMethod {
....[[MyClass alloc] initWithTitle:@"title"
....```````````````````````message:@"message"
....]
}
(Use monospace font to view it). Here dots represent indentation and "`" represents alignment. If you use tabs for alignment (as Xcode does currently), alignment will be ruined as soon as you change your tab size. So it should be prohibited to use "tabs only" scheme. It has no benefits at all.
I have an open question on StackOverflow for two years now, describing this topic in detail: http://stackoverflow.com/questions/16208065/how-to-get-indent-with-tabs-align-with-spaces-behavior-in-xcode
As for the date of writing this bug-report, it has almost 14k views and over 20 pluses.
I really hope that Xcode will learn to do it one day. Various IDEs can do it for a long time now (Qt Creator, all IDEs by JetBrains, there are probably others).
Looking forward to receiving your reply.

Steps to Reproduce:
1. Select "Tabs" indentation settings.
2. Type in some complicated code in the editor.

Expected Results:
Either:
1. There is a third option in the settings: "Indent with tabs, align with spaces".
2. When user selects tabs, the code is formatted using "indent with tabs, align with spaces" paradigm instead of "tabs only".

Actual Results:
The code is formatted using the "tabs only" paradigm.

Version:


Notes:
My question on StackOverflow devoted to this problem:
http://stackoverflow.com/questions/16208065/how-to-get-indent-with-tabs-align-with-spaces-behavior-in-xcode

Configuration:
Any Xcode, any OS X, really.
My configuration: OS X 10.10.5, Xcode Version 6.4 (6E35b).

Attachments:

Comments

I received an answer from Apple. This bug is a duplicate of rdar://8165023.

By demid.itsk at Aug. 21, 2015, 10:29 a.m. (reply...)

Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!