Xcode – How to indent multiple lines in Xcode

code formattingxcode

When I select multiple lines of code and want to indent them as usual with TAB key, it just deletes them all. I come from Eclipse where I always did it that way. How's that done in Xcode? I hope not line by line 😉

Best Answer

The keyboard shortcuts are ⌘+] for indent and ⌘+[ for un-indent.

  • In Xcode's preferences window, click the Key Bindings toolbar button. The Key Bindings section is where you customize keyboard shortcuts.