获取修改权限
sudo chmod 666 /Applications/Xcode.app/Contents/Frameworks/IDEKit.framework/Resources/IDETextKeyBindingSet.plist
sudo chmod 777 /Applications/Xcode.app/Contents/Frameworks/IDEKit.framework/Resources/
新增快捷方式
open /Applications/Xcode.app/Contents/Frameworks/IDEKit.framework/Resources/IDETextKeyBindingSet.plist
剪切行
Key Cut Line
Value selectLine:, copy:, deleteLine:
粘贴行
Key Paste Line Under
Value moveToEndOfLine:, insertNewline:, paste:, deleteBackward:
设置快捷键
重启Xcode,在 preferences 里找到Key Bindings,再查找 Cut Line
和 Paste Line Under
两个选项,再设置快捷键即可。