In matlab if you highlight a section of code and press cmd+i on mac it corrects all the indentation.
Is there a similar command for xcode? Say I have a for loop inside a while loop inside a method, yet each line is flush on the left, can I highlight it all and get the tabbing fixed?
Yes, you can do that in Xcode as well - default shortcut for that is
ctrl+I