xcode下增加复制一行快捷键的办法

习惯了eclipes得删除一行,复制一行操作的,到Xcode发现居然没有这个快捷键,于是找了个插件,但是不支持Xcode 6。

 发现用Xcode自带的命令进行组合,也可以办到。

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

然后VIM编辑,在这个XML文件中增加如下字段

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

保存退出。

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

编程效率大大提高。


你可能感兴趣的:(xcode下增加复制一行快捷键的办法)