Multiple-line cursor movements in XCode

南笙酒味 提交于 2019-12-06 12:20:05
Ashley Clark

You can use the example given here and use a DefaultKeyBinding.dict file, except use moveUp: and moveDown: as your selectors.

Your particular dictionary entry would look something like this:

{
    "^~P" = (
        "moveUp:",
        "moveUp:",
        "moveUp:",
        ... however many times ...
        "moveUp:",
    );
}

I have since learned that if you have customized your keybindings through Xcode already you should instead add the same dictionary entry to your .pbxkeys file under the text dictionary section.

Just a reminder for the impatient who didn't read all the way to the end of oldbeamer's question and are also looking to use .pbxkeys instead of .dict:

If you are wanting to add multi-action keybindings to your pbxkeys file, the XML formatting goes like this:

    <key>...</key>
    <array>
            <string>action1:</string>
            <string>action2:</string>
            <string>etc:</string>
    </array>

You can edit the .pbxkeys directly using a text editor to add custom multi-action keybindings this way.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!