Xcode 整行删除和复制

1、修改权限,终端输入命令

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

2、打开plist文件,终端输入命令

open /Applications/Xcode.app/Contents/Frameworks/IDEKit.framework/Resources/IDETextKeyBindingSet.plist

3、整行删除

找到 root 下的 Deletions
在 Deletions 下添加key: Delete Current Line
value:deleteToBeginningOfLine:, moveToEndOfLine:, deleteToBeginningOfLine:, deleteBackward:

4、整行复制并在其下面插入复制后的内容

找到 root 下的 Insertions and Indentations
在 Insertions and Indentations 下添加key:Duplicate Current Line
value:selectLine:, copy:, moveLeft:, moveToEndOfLine:, insertNewline:, paste:, deleteBackward:

在 Insertions and Indentations 下添加key:Insert Line Under
value:moveToEndOfLine:, insertNewline:

5、重启Xcode,设置快捷键

重启 Xcode ,在 Preferences 里找到 Key Bindings
找到Delete Current LineDuplicate Current Line设置对应的快捷键

6、全剧终

©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

友情链接更多精彩内容