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 ;)
You can select multiple rows (select the first row in the far left and hold down shift and select the last row) and then use the Indent/Outdent feature to change them.
Choose Xcode > Preferences… from the menu bar (default shortcut: command-comma). Then click the “Text Editing” section. Then choose the “Indentation” tab.
To indent the first line of a paragraph, put your cursor at the beginning of the paragraph and press the tab key. When you press Enter to start the next paragraph, its first line will be indented.
The keyboard shortcuts are ⌘+] for indent and ⌘+[ for un-indent.
Select your code to reindent, then Go to
Editor -> Structure -> Re-Indent
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With