为Xcode添加删除整行、复制整行、在下方新建一行快捷键

修改权限

修改Xcode里快捷键的配置文件(plist)权限,打开终端输入如下两条命令:
sudo chmod 666 /Applications/Xcode.app/Contents/Frameworks/IDEKit.framework/Resources/IDETextKeyBindingSet.plist
sudo chmod 777 /Applications/Xcode.app/Contents/Frameworks/IDEKit.framework/Resources/

打开plist 文件

open /Applications/Xcode.app/Contents/Frameworks/IDEKit.framework/Resources/IDETextKeyBindingSet.plist

删除整行

然后找到root下的Deletions,在Deletions下添加一个key:Delete Current Line值为:
deleteToBeginningOfLine:, moveToEndOfLine:, deleteToBeginningOfLine:, deleteBackward:

复制整行和在下方添加一行

Insertions and Indentations下添加两个key

Duplicate Current Line 值为:selectLine:, copy:, moveLeft:, moveToEndOfLine:, insertNewline:, paste:, deleteBackward:

Insert Line Under 值为: moveToEndOfLine:, insertNewline:

你可能感兴趣的:(为Xcode添加删除整行、复制整行、在下方新建一行快捷键)