Xcode 9 hitting tab at start of line that already has leading spaces does nothing
| Originator: | aufflick | ||
| Number: | rdar://32888891 | Date Originated: | 21/6/2017 |
| Status: | Open | Resolved: | |
| Product: | Xcode | Product Version: | 9 beta 9M136h |
| Classification: | Frustrating | Reproducible: | Always |
Where the periods are spaces, and the I is the insertion cursor, if you press tab - the insertion cursor does not move. If there were *no* spaces, the insertion cursor would jump to the appropriate place (ie. four characters in - anyone who has indentation set to anything other than four spaces deserves what they get).
Xcode 8 and earlier jump the insertion point cursor to the place where you want to start typing. After all - there is no way for the meagre human brain to know that there are four spaces there already as opposed to nothing at all, and so it's impossible to know whether to hit tab, or ^e to jump there. Xcode's infinitely superior capabilities and wisdom should be helping us mere mortals out here.
Steps to Reproduce:
With tab key set to "always indent" in the indentation preferences, if you have e.g.:
{
I....
}
Where the periods are spaces, and the I is the insertion cursor, if you press tab - the insertion cursor does not move. If there were *no* spaces, the insertion cursor would jump to the appropriate place (ie. four characters in - anyone who has indentation set to anything other than four spaces deserves what they get).
Expected Results:
The cursor jumps to the indented starting place where we wish to start typing our awesome world-changing code.
Observed Results:
Xcode stubbornly continues to blink it's insertion point at the same location, as if it's made friends with a USB type A connector and is insisting that we try at least three different key commands in random order before it will begrudgingly move the insertion point to where we want.
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!
Actually it's more than three keys you need to do if there's already text. Eg:
I...[foo bar];
And you want to insert "return " you now need to ^f^f^f^freturn instead of treturn in Xcode 8 (plus you need to think, which uses probably the same number of brain cycles as another half dozen keystrokes).