Xcode增加跳转到一行快捷键

2021-07-26  本文已影响0人  独孤流

参考:Xcode添加快捷键(复制n行插入下一行之前、在下一行之前插入一空行)

1、前往文件夹(Command+Shift+G)

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

2、将文件IDETextKeyBindingSet.plist拷贝到桌面

3、向复制出的plist文件中的Insertions and Indentations添加两个key
Root->Insertions and Indentations 里新增下面两条

key value
Duplicate Current Line selectLine:, copy:, moveToEndOfLine:, moveToBeginningOfLine:, paste:, moveBackward:
Insert Line Below moveToEndOfLine:, insertNewline:
image.png

4、将修改后的IDETextKeyBindingSet.plist文件拖回原目录进行替换

5、重启Xcode, 进入Xcode->Preferences->Key Bindings 对新添加的Duplicate Current Line和Insert Line Below设置快捷键


image.png

设置完成,打开编辑器体验。

设置完成后如果出什么错了,可以将xcode所有默认设置复原,##终端输入命令如下:

defaults delete com.apple.dt.Xcode
上一篇 下一篇

猜你喜欢

热点阅读