Put that { where it (might) belong, Xcode!
http://github.com/sveinungkb/ios-convenience/blob/master/SystemCodeSnippets.codesnippets
After some poking around in Xcode 4.2´s files, I finally found a way to edit all the if, switch, class, methods etc snippets to have the opening curly brace on its own line. This is our convention, and I bet we´re not alone. Adding a manual new line for every if-statement is waste of good brain power, so why not let Xcode do it right in the first place?
If your convention is something else, keep using it, if you´re cool - and want your if statements like this:
if (YES)
{
NSLog(@"Tidy code == win!");
}
Then: * Quix Xcode
Make a backup of your
/Developer/Library/Xcode/PrivatePlugIns/IDECodeSnippetLibrary.ideplugin/Contents/Resources/SystemCodeSnippets.codesnippetsMake another backup if you intend to screw something up
Create a file on your desktop called:
SystemCodeSnippets.codesnippetsDownload the linked file to your desktop
Copy your desktop´s
SystemCodeSnippets.codesnippetsto/Developer/Library/Xcode/PrivatePlugIns/IDECodeSnippetLibrary.ideplugin/Contents/Resources/SystemCodeSnippets.codesnippetsStart Xcode
Type wonderful if, else, switch and for statements, all day long! <3
