Tab and Shift+Tab do not behave as expected in Xcode

Originator:peterwunder
Number:rdar://27739863 Date Originated:08-Aug-2016
Status:Open Resolved:
Product:Developer Tools Product Version:
Classification:UI/Usability Reproducible:Always
 
Summary:
The default key combination for indentation and un-indentation (or "Shift Right" and "Shift Left", as Xcode calls them) are ⌘[ and ⌘], which are nearly impossible to press with my standard German QWERTZ keyboard layout.
Every other code editor I know (excluding vim, emacs etc. because who _knows_ what they do) uses Tab and Shift+Tab respectively.

It's possible to bind Shift Left to Shift+Tab, but it's currently (as of Xcode 7.3.1 (7D1014)) impossible to bind Shift Right to Tab because while Xcode will happily accept Tab as a key in the Key Bindings preference pane, it won't trigger the associated action when hitting Tab.
This makes sense when the cursor is in the middle of or at the end of a line, when it's probable that the user actually wants to type a tab character, but it's absolute nonsense when the cursor is at the start of a line, or when the current text selection includes a newline character.
Compare Xcode's current behavior with that of Sublime Text 3 (or any other code editor with a GUI, really) to see what I mean.

Please reconsider the default key bindings for Xcode 8 and make Tab and Shift+Tab the new, sensible default.

Steps to Reproduce:
1. Place the cursor in front of a line or select multiple lines of text
2. Hit Tab to indent or Shift+Tab to unindent said text

Expected Results:
The line behind the cursor (or the selected block of text) jumps one tab width to the left or right

Actual Results:
You let out a tired sigh, hit ⌘Z and either indent everything by either placing the cursor in front of every single line manually, then hitting Tab, or unindent everything by placing the cursor in front of every single line manually, then hitting Backspace to delete a tab character.

Version:
7.3.1 (7D1014) on OS X 10.11.6 (15G31)

Configuration:
This occurs on every Mac with any currently available version of Xcode.

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!