- 复制
/Applications/Xcode.app/Contents/Frameworks/IDEKit.framework/Resources/IDETextKeyBindingSet.plist
文件到桌面 - 自定义快捷键[编辑桌面上的
IDETextKeyBindingSet.plist
文件] - 用编辑好的
IDETextKeyBindingSet.plist
文件替换/Applications/Xcode.app/Contents/Frameworks/IDEKit.framework/Resources/IDETextKeyBindingSet.plist
文件[需要输入密码才能替换成功] - 重启Xcode,绑定快捷键
#1. 复制
cp /Applications/Xcode.app/Contents/Frameworks/IDEKit.framework/Resources/IDETextKeyBindingSet.plist ~/Desktop
#2. 自定义快捷键
<key>My Custom Actions</key>
<dict>
<key>Insert Line Below</key>
<string>moveToEndOfLine:, insertNewline:</string>
<key>Insert Line Above</key>
<string>moveUp:, moveToEndOfLine:, insertNewline:</string>
</dict>
#3. 替换IDETextKeyBindingSet.plist文件
sudo cp ~/Desktop/IDETextKeyBindingSet.plist /Applications/Xcode.app/Contents/Frameworks/IDEKit.framework/Resources/IDETextKeyBindingSet.plist
参考:
网友评论