Xcode 4.2: no way to change indent style of built-in code snippets
| Originator: | bunnyhero | ||
| Number: | rdar://10288609 | Date Originated: | 14-Oct-2011 |
| Status: | Open | Resolved: | |
| Product: | Developer Tools | Product Version: | Xcode 4.2 (4C199) |
| Classification: | Usability/UI | Reproducible: | Always |
Summary:
The built-in code snippets contain many useful C constructs such as for loops, if else statements, etc. Unfortunately, the indent style if these snippets may not match the coding style required by the user or organization. Furthermore, the built-in snippets cannot be edited.
Steps to Reproduce:
1. In Xcode 4.2, open a file in the source editor
2. Type "ifelse" (without the quotes)
3. Press "enter" to accept the suggested completion.
4. Note the formatting of the inserted snippet
if (<#condition#>) {
<#statements-if-true#>
} else {
<#statements-if-false#>
}
5. Note that the position of the opening brace does not match my organization's coding style guidelines.
6. Look frantically (but thoroughly) through Xcode's menus, preferences and documentation for any way to change the formatting of inserted code snippets.
Expected Results:
Some way of specifying the formatting of if-else blocks and the like.
Actual Results:
No way to specify formatting of if-else blocks and the like.
Regression:
Note that Xcode 3 had a user default called XCCodeSenseFormattingOptions which allowed the user many options
Notes:
If the built-in code snippets could be edited, I could change them all to match our house coding style. Unfortunately, clicking on the "edit" button of any built-in code snippet does not actually allow editing.
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!
And dup'd again
rdar://11891706
rdar://11110459
Just filed rdar://11110459, also basically a duplicate of this.
Dup'd
I just filed rdar://11031647 that essentially dups this.