其他分享
首页 > 其他分享> > MacOs XCode10.1 添加快捷复制一行,删除一行

MacOs XCode10.1 添加快捷复制一行,删除一行

作者:互联网

先执行命令修改权限

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

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

1在Deletions下面增加:
“Delete Current Line”
String类型
值:deleteToBeginningOfLine:, moveToEndOfLine:, deleteToBeginningOfLine:, deleteBackward:, moveDown:, moveToBeginningOfLine:

在Insertions and Indentations下面增加:Duplicate Current Line,String类型 值为:
selectLine:, copy:, moveToEndOfLine:, insertNewline:, paste:, deleteToBeginningOfLine:, deleteBackward:

设置快捷键:Xcode > Preferences > KeyBindings 找到对应新增的快捷item,然后添加快捷键。保存重启xcode即可。

目前复制与删除快捷可以用,但是复制的时候,插入的位置是复制当前行后的第二行。奇怪了。

标签:MacOs,Xcode,一行,plist,Applications,IDEKit,Resources,app,XCode10.1
来源: https://blog.csdn.net/LlanyW/article/details/122265891