Xcode 5中的键绑定 [英] Key bindings in Xcode 5
问题描述
我曾经这样做: Xcode重复行
但是IDETextKeyBindingSet.plist不再存在.
But IDETextKeyBindingSet.plist doesn't exist anymore.
有一个名为"KeyBindings"的文件夹,其中带有空白文本文件.
There is a folder called "KeyBindings" with a blank text file in it.
那我们现在如何设置键绑定?
So how do we set up key bindings now?
具体地说,我只希望Command-D复制光标所在的行,这是除Xcode之外所有其他IDE的基本功能.
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.
推荐答案
KeyBindings
目录仅存储Xcode中可用操作的每个用户的键绑定.另一方面,IDETextKeyBindingSet.plist
允许您向Xcode本身添加一个操作(然后将键绑定放入您的KeyBindings
目录中).
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).
只需再次将IDETextKeyBindingSet.plist
文件放入/Applications/Xcode.app/Contents/Frameworks/IDEKit.framework/Resources
(位置与Xcode 4中的相同).并且要自己做个备份,因为每次Xcode升级都会默认使用您自定义的绑定(如果有更好的Xcode升级解决方案,我很高兴).
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).
这篇关于Xcode 5中的键绑定的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!