给Xcode设置 添加行 删除行快捷键功能

Xcode Version 6.1

在终端运行

sudo chmod 666 /Applications/Xcode.app/Contents/Frameworks/IDEKit.framework/Resources/IDETextKeyBindingSet.plist

然后打开 /Applications/Xcode.app/Contents/Frameworks/IDEKit.framework/Resources/IDETextKeyBindingSet.plist

在Deletions下添加 (注意逗号后面还有空格)

<key>Delete Current Line</key>                                                                                                      
    <string>moveToEndOfLine:, deleteToBeginningOfLine:, moveDown:, moveToBeginningOfLine:, deleteBackward:</string>                                                  
    <key>Duplicate Current Line</key>                                                                                                      
    <string>selectLine:, copy:, moveToEndOfLine:, insertNewline:, paste:, deleteBackward:</string>

然后重启Xcode,打开Preferences 偏好设置,Key Bindings,找到“Delete Current Line”和”Duplicate Current Line”这两项,设置为自己想要的快捷键。





猜你喜欢

转载自blog.csdn.net/langzxz/article/details/48245591