您的位置:首页 > 其它

给Xcode增加复制行、删除行快捷键的方法

2016-03-09 20:00 525 查看
[b]修改
Xcode
里快捷键的配置文件
(plist)
权限,打开终端输入如下两条命令:
[/b]

<code class="hljs avrasm has-numbering">sudo chmod <span class="hljs-number">666</span> /Applications/Xcode<span class="hljs-preprocessor">.app</span>/Contents/Frameworks/IDEKit<span class="hljs-preprocessor">.framework</span>/Resources/IDETextKeyBindingSet<span class="hljs-preprocessor">.plist</span>
sudo chmod <span class="hljs-number">777</span> /Applications/Xcode<span class="hljs-preprocessor">.app</span>/Contents/Frameworks/IDEKit<span class="hljs-preprocessor">.framework</span>/Resources/</code>


1. 在Finder 中输入
+ shift + G
,然后复制这个路径粘贴并点击前往或者直接回车

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









2.鼠标右击拷贝
IDETextKeyBindingSet.plist
,然后在桌面上右击粘贴项目




3.右击
IDETextKeyBindingSet.plist
,打开方式 --> 其他,找到文本编辑  双击打开








4.编辑加入

<key>Custom<key>



<dict>

<key>Delete CurrentLine In One Hit</key>



<string>



[b]deleteToBeginningOfLine:, moveToEndOfLine:, deleteToBeginningOfLine:, deleteBackward:, moveDown:, moveToBeginningOfLine:

[/b]

</string>

<key>DuplicateCurrent Line</key>

<string>



selectLine:, copy:, moveToEndOfLine:, insertNewline:, paste:, deleteBackward:



</string>

</dict>



5.Ctrl+ s保存

把修改过后的文件覆盖原来的
IDETextKeyBindingSet.plist


5.

重启xcode

打开Xcode Preferences or
+,


点击 Key Bindings

在搜索框中输入 Delete,找到
DeleteCurrent Line in One Hit


双击
Key
,设置为
+D
(你可以设置为你喜欢的快捷键)。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: