Currently Reading

Image of Derivatives Demystified: A Step-by-Step Guide to Forwards, Futures, Swaps and Options (The Wiley Finance Series)

Image of Working Effectively with Legacy Code (Robert C Martin)

Image of Coders at Work: Reflections on the Craft of Programming

Image of Succeeding with Agile: Software Development Using Scrum (Addison-Wesley Signature)

Image of iPhone UK: The Missing Manual

Image of My Shit Life So Far

Recently Read

Image of Refactoring: Improving the Design of Existing Code (Object Technology Series)

Image of Test Driven: TDD and Acceptance TDD for Java Developers

Image of Clean Code: A Handbook of Agile Software Craftsmanship (Robert C. Martin)

Image of iPhone Advanced Projects (Books for Professionals by Professionals)

Image of ActionScript 3.0 Design Patterns: Object Oriented Programming Techniques (Adobe Developer Library)

Image of Advanced Actionscript 3 with Design Patterns

Image of The Secrets of Consulting: A Guide to Giving and Getting Advice Successfully

Image of Cloud Atlas

Image of Test Driven Development (The Addison-Wesley Signature Series)

Image of UML 2 for Dummies


February 3, 2010

Custom Eclipse Style XCode shortcuts

Filed under: Flex, XCode tips, iphone — Anthony @ 11:52 pm

After using eclipse for so long i have become a custom to my shortcuts and xcode just doesn't stand up to the job as far as i am concerned so here is a small list of the custom key bindings i have setup for myself. I will add more as I create them.

To create a custom key bindings file goto XCode>Preferences>Bindings> Duplicate an existing binding and name it whatever you want then go to and open the file you just created in a text editor so you can see the xml output.

~/Library/Application Support/Xcode/Key Bindings/*.pbxkeys

A good list of available commands can be found here

1. Duplicate code!

I can't believe xcode doesn't have this in Eclipse you simple select your text and press Ctrl + Alt and either Up or Down on the keypad and it will duplicate your code placing it either above or below the current selection. It will also reselect the newly duplicated code so that you can duplicate it as many times as you like.

<key>^~\U700</key>
<array>
<string>copy:</string>
<string>moveUp:</string>
<string>moveToEndOfLine:</string>
<string>insertLineBreak:</string>
<string>insertNewLine:</string>
<string>setMark:</string>
<string>paste:</string>
<string>selectToMark:</string>
</array>
<key>^~\U701</key>
<array>
<string>copy:</string>
<string>moveDown:</string>
<string>moveToBeginningOfLine:</string>
<string>insertLineBreak:</string>
<string>insertNewLine:</string>
<string>moveUp:</string>
<string>setMark:</string>
<string>paste:</string>
<string>selectToMark:</string>
</array>
2. Delete Line.
Deletes the current line your cursor is on. press Ctrl + D.
<key>^d</key>
<array>
<string>cut:</string>
<string>selectLine:</string>
<string>cut:</string>
</array>