Here is what Apple said in reply to my bug report in June.
Please know that there is a setting that controls this (which should be off by default). In Xcode > Settings > Text Editing > Editing, it’s called “Automatically reformat when completing code”.
I don't know what "controls this" means. Does "on" mean add unwanted indentation and "off" mean do not add unwanted indentation?
But regardless, I filed another report regarding this setting having no effect. Apple's reply:
It only reformats code that’s wider than the specified column, and only if the code is made up of nested expressions (function calls, etc), that can be wrapped to new lines.
In any case, my code never extends to the "Reformat code at column" location, as shown in my screen recordings. Every line jumps around. Mine go in the opposite direction from yours. But it's never where I want it.
Obviously I don't understand the logic that Apple's using for these indentations. But it seems clear that there is only one coding style that Apple now allows - this one:
- (void) applicationDidFinishLaunching: (NSNotification *) aNotification {
int value = 1;
}
The key is having that opening brace on the previous line. Nothing else is allowed.
I still don't understand why your indentation is going backwards from mine. But thanks for posting your settings screenshots. I'll try to reproduce this later on Sequoia. I'm still using Ventura for production work. 😄
Topic:
Developer Tools & Services
SubTopic:
Xcode