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 ;)
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 ;)
The keyboard shortcuts are ⌘+] for indent and ⌘+[ for un-indent.
Multiline Indentation Shortcut key:
ctrl + i
NOTE: Please select codes to Re-indent and press 'control' and 'i' on your mac.
Another way to quickly reformat indenting is a quick cut and paste. ⌘+x and ⌘+v. I often find it faster than ⌘+[ or ⌘+] as you can do it with one hand (versus two) and it will reformat to the correct indent level in one shot.
For code indentation first select the lines of code then press:
command + alt + [
command + alt + ]