之前用eclipse的时候经有两个快捷键,复制当前行到下一行,和删除当前行,但转到ios以后怎么也找不到xcode关于这俩快捷键的设置,很别扭,最近又搜索了下,终于找到了。
设置方法先执行命令修改权限
sudo chmod 666 /Applications/Xcode.app/Contents/Frameworks/IDEKit.framework/Resources/IDETextKeyBindingSet.plist
sudo chmod 777 /Applications/Xcode.app/Contents/Frameworks/IDEKit.framework/Resources/
第一次设置没有成功,因为我电脑上装了俩xcode:xcode7 和xcode8 默认设置了xode7的,改成Xcode8.app成功了
修改plist
- 打开
/Applications/Xcode.app/Contents/Frameworks/IDEKit.framework/Resources/IDETextKeyBindingSet.plist
1
在Deletions下面增加:
“Delete Current Line”
String类型
值:
deleteToBeginningOfLine:, moveToEndOfLine:, deleteToBeginningOfLine:, deleteBackward:, moveDown:, moveToBeginningOfLine:
2
在Insertions and Indentations下面增加:Duplicate Current Line,String类型 值为:
selectLine:, copy:, moveToEndOfLine:, insertNewline:, paste:, deleteToBeginningOfLine:, deleteBackward:
设置快捷键
删除 复制Xcode > Preferences > KeyBindings 找到
网友评论