運行:
sudo chmod 666 /Applications/Xcode.app/Contents/Frameworks/IDEKit.framework/Resources/IDETextKeyBindingSet.plist
然后打開/Applications/Xcode.app/Contents/Frameworks/IDEKit.framework/Resources/IDETextKeyBindingSet.plist,在Deletions下面增加:Delete Current Line凳枝,值為:
deleteToBeginningOfLine:, moveToEndOfLine:, deleteToBeginningOfLine:, deleteBackward:, moveDown:, moveToBeginningOfLine:
在Insertions and Indentations下面增加:Duplicate Current Line碟刺,值為:
selectLine:, copy:, moveToEndOfLine:, insertNewline:, paste:, deleteBackward:
然后重啟Xcode,打開設置除抛,Key Bindings狮杨,找到“Delete Current Line”和”Duplicate Current Line”這兩項,設置為自己想要的快捷鍵到忽。