Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Custom key bindings Xcode 4?

Awhile back I asked a question about custom key bindings in Xcode. I ended up recreating some of TextMate's key commands in Xcode. Just updated to Xcode 4 and it appears that the PBKeyBinding file no longer has any effect. What's the new hotness for custom key bindings, specifically for Xcode 4?

like image 635
typeoneerror Avatar asked Apr 11 '11 19:04

typeoneerror


2 Answers

Yes, it can be done (at least for the moment). After spending the better part of a day searching, experimenting and digging through the bowls of /Developer I finally figured out how to accomplish this.

Open IDETextKeyBindingsSet.plist located in /Developer/Library/PrivateFrameworks/IDEKit.framework/Resources/

This bindings plist is formatted differently than others used throughout the system, the most important distinction is that all the methods must be listed in the same string, i.e. <string>moveToBeginningOfParagraph:, insertText:, foo</string>

edit: I have not tested this, but it looks like the new location in Xcode is Xcode.app/Contents/Frameworks/IDEKit.framework/Resources/IDETextKeyBindingSet.plist

like image 137
atommclain Avatar answered Sep 28 '22 05:09

atommclain


You can use Keymando to create any keybinding you like in Xcode 4 and any other OSX application.

like image 43
Kevin Colyar Avatar answered Sep 28 '22 05:09

Kevin Colyar