美文网首页
Xcode 整行删除和复制

Xcode 整行删除和复制

作者: 邓布利多教授 | 来源:发表于2021-04-19 09:28 被阅读0次

    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/
    

    2、打开plist文件,终端输入命令

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

    3、整行删除

    找到 root 下的 Deletions
    在 Deletions 下添加key: Delete Current Line
    value:deleteToBeginningOfLine:, moveToEndOfLine:, deleteToBeginningOfLine:, deleteBackward:

    4、整行复制并在其下面插入复制后的内容

    找到 root 下的 Insertions and Indentations
    在 Insertions and Indentations 下添加key:Duplicate Current Line
    value:selectLine:, copy:, moveLeft:, moveToEndOfLine:, insertNewline:, paste:, deleteBackward:

    在 Insertions and Indentations 下添加key:Insert Line Under
    value:moveToEndOfLine:, insertNewline:

    5、重启Xcode,设置快捷键

    重启 Xcode ,在 Preferences 里找到 Key Bindings
    找到Delete Current LineDuplicate Current Line设置对应的快捷键

    6、全剧终

    相关文章

      网友评论

          本文标题:Xcode 整行删除和复制

          本文链接:https://www.haomeiwen.com/subject/pjzblltx.html