本文介绍了XCode 4中的多行光标移动的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人问过相同的问题要求输入Xcode 3 但是据说那里的解决方案不适用于Xcode4.而且那里没有新的解决方案.

The same question has been asked for Xcode 3But the solution there is said to not work with Xcode4. And no new solution is available there.

如何获取键绑定以在Xcode 4中将光标向上/向下移动约10行?

How to get a key-binding to move the curser up/down about 10 lines in Xcode 4 ?

推荐答案

尤里卡!受 answer on行复制的启发,这就是通过多行移动为Xcode 4赋权的方式:

Eureka! Inspired by the answer on line duplication, this is how you empower Xcode 4 with multiple-line movement:

  1. 转到文件夹/Applications/Xcode.app/Contents/Frameworks/IDEKit.framework/Versions/A/Resources
  2. 打开IDETextKeyBindingSet.plist.
  3. 添加一个新词典Customized和两个新命令(例如Move Down 10Move Up 10)键,如下图所示:
  4. 重新启动Xcode并转到首选项-按键绑定",搜索您的命令.
  5. 设置两个命令的组合键:

  1. Go to the folder /Applications/Xcode.app/Contents/Frameworks/IDEKit.framework/Versions/A/Resources
  2. Open IDETextKeyBindingSet.plist.
  3. Add a new dictionary Customized and two new command (say, Move Down 10 and Move Up 10) keys as the screenshot below:
  4. Restart Xcode and go to Preferences - Key Bindings, search for your command.
  5. Set a key combination for both commands:

最终摆脱了Jump To快捷方式的束缚.享受吧!

Free at last from the shackles of the Jump To shortcut. Enjoy it!


奖金:系统范围内的多行移动

执行以下步骤,将光标释放到Xcode外部:


Bonus: system-wide multiple-line movement

Unleash the cursor outside Xcode following with these steps:

  1. 转到文件夹~/Library/KeyBindings
  2. 打开DefaultKeyBinding.dict.
  3. 输入以下内容.根据需要进行自定义.
  1. Go to the folder ~/Library/KeyBindings
  2. Open DefaultKeyBinding.dict.
  3. Enter the following. Customize as appropriate.

"^〜n" =("moveUp:","moveUp:","moveUp:","moveUp:","moveUp:","moveUp:","moveUp:","moveUp:", "moveUp:","moveUp:");
"^〜p" =("moveDown:","moveDown:","moveDown:","moveDown:","moveDown:","moveDown:","moveDown:","moveDown:","moveDown: ","moveDown:");

"^~n" = ("moveUp:", "moveUp:", "moveUp:", "moveUp:", "moveUp:", "moveUp:", "moveUp:", "moveUp:", "moveUp:", "moveUp:");
"^~p" = ("moveDown:", "moveDown:", "moveDown:", "moveDown:", "moveDown:", "moveDown:", "moveDown:", "moveDown:", "moveDown:", "moveDown:");

}

  • 注销&登录

  • 以上所有内容均适用于Xcode 4.5.1.10.8.2.


    All of the above works on 10.8.2 with Xcode 4.5.1.

    这篇关于XCode 4中的多行光标移动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

    09-18 03:19