Posted by: bearc0025 | November 4, 2009

Xcode User Defaults

Xcode User Defaults

via Mac Dev Center: Xcode User Default Reference: Xcode User Defaults.

When I upgraded to Xcode 3.2.1 a lot of my preferences seemed to be changed for me. In particular were some code sense and indentation settings I liked.

I fixed a few via Xcode->Preferences, but the brace {} settings weren’t in there.

So now when I typed if, I got

if (condition) {...

The above link describes the defaults you can set via command line. I used this one to fix my formatting:

defaults write com.apple.Xcode XCCodeSenseFormattingOptions -dict PreExpressionsSpacing " " BlockSeparator "\n" PostBlockSeparator "\n"

This command tells you what your current formatting options are:

defaults read com.apple.Xcode XCCodeSenseFormattingOptions

Now it’s…

if (condition)

{

Advertisements

Responses

  1. Another good one to change your __MyCompanyName__ value…

    defaults write com.apple.Xcode PBXCustomTemplateMacroDefinitions -dict ORGANIZATIONNAME “Brainwash Inc.”

    See http://developer.apple.com/mac/library/documentation/DeveloperTools/Reference/XcodeUserDefaultRef/100-Xcode_User_Defaults/UserDefaultRef.html#//apple_ref/doc/uid/TP40005535-CH3-SW10


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Categories

%d bloggers like this: