views:

46

answers:

1

ok, possibly insanely n00b question or something i have overlooked in Xcode prefs: On pressing return, in stead of Xcode's syntax-aware indentation doing smart indent from whatever brackets i've used on the previous line, how can I make it so Xcode indents just from the beginning of the previous line? From the picture below, first block of code is what i got, second block of code is what I want.

Visual representation: visual representation

A: 

As an alternative to xcodes formatting, you can use Uncrustify. It can understand Objective as well as a variety of other languages. I set mine up as a script in xcode and assigned it a hot key so that it reformats the whole file or just the selected code.

Derek Clarkson