I'd like to map a key to move the cursor in the XCode up by ten lines. Of course, I want another one to move down too. The key mapping would ideally be something like 'Control-Alt-P'.
Is there a way to achieve this in XCode without resorting to Automator?
Ashley has the answer below, the formatting was a little different as the property list is in XML format.
In summary, added an entry in the following format to the 'text' section of *.pbxkeys in ~/Library/Application Support/Xcode/Key Bindings/:
<key>^~p</key>
<array>
<string>moveUp:</string>
<string>moveUp:</string>
</array>
-
You can use the example given here and use a
DefaultKeyBinding.dictfile, except usemoveUp:andmoveDown: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
.pbxkeysfile under thetextdictionary section.
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.