Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Key bindings in Xcode 5

I used to do this: Xcode duplicate line

But IDETextKeyBindingSet.plist doesn't exist anymore.

There is a folder called "KeyBindings" with a blank text file in it.

So how do we set up key bindings now?

Specifically I just want command-D to duplicate the line the cursor is in, which is a basic functionality of every other IDE except Xcode.

like image 724
soleil Avatar asked Jan 12 '23 06:01

soleil


1 Answers

The KeyBindings directory stores just per-user key bindings for already available operations in Xcode. On the other hand, the IDETextKeyBindingSet.plist lets you add an operation to Xcode itself (and afterwards put a key binding into your KeyBindings dir).

Just put the IDETextKeyBindingSet.plist file again into /Applications/Xcode.app/Contents/Frameworks/IDEKit.framework/Resources (the location is the same as in Xcode 4). And make yourself a backup, since each Xcode upgrade will default your customized bindings (if there's a better solution for Xcode upgrades, I'm all ears).

like image 170
Blaz Avatar answered Jan 21 '23 01:01

Blaz