Xcode: cannot set tab width based on file type

Originator:klazuka
Number:rdar://19875420 Date Originated:18-Feb-2015 09:36 AM
Status:Open Resolved:
Product:Developer Tools Product Version:Xcode 6.1.1 (6A2008a)
Classification:UI/Usability Reproducible:Always
 
Summary:
There is no way in Xcode to specify, for example, a 2-space tab-width for Objective-C files and a 4-space tab-width for Swift files.

Steps to Reproduce:
Go into Xcode -> Preferences -> Text Editing -> Indentation
Notice that all tab width configuration is done on a global basis. There is no way to specify it based on file type.

Expected Results:
Tab Width should be configurable at several levels:
- global
- .xcodeproj
- file type (e.g. .m vs .swift)

Actual Results:
Tab width can only be set globally.

Notes:
This feature is important to us because we have a large objective-c codebase that we are slowly migrating to Swift. The objc code was all written with 2-space tabs to try to reduce the length of lines due to objc verbosity. This is no longer desirable in Swift, and we would like to write all new Swift code going forward with a 4-space tab.

Comments


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!