views:

87

answers:

3

is there a way to organize the the position of the code (straighten ...) automatically?

+2  A: 

Edit menu > Format > Re-indent.

Dave DeLong
thats the one :-)
omri
In Xcode prefs, you can go to the Key Bindings section and give this command a keyboard shortcut. I've given it Shift-Cmd-I, for convenience. Then you don't have to use your mouse to re-indent. =)
Dave DeLong
A: 

Go to Preferences (+,). Then scroll along the top to the right and click the "Indent" header. There should be an option called something like "Indent text automatically." That should do what you want. :)

Chris Long
also works, thanks.
omri
NP, make sure you check this option, so you don't have to worry about indentation on any new code you write.
Chris Long
A: 

You can select the code and then choose "Reindent selection" from the context menu.

Jasarien