Allan
Thank you for your prompt response. I now have something of a puzzle:
1) I recorded both the desired and undesired keystrokes in a macro. As you suggested, the one I want is 'moveWordLeft:', and the other is 'moveSubWordLeft:'.
2) However, I already bound the ctrl-arrow combinations to 'moveWordLeft/Right:' in ~/Library/KeyBindings/DefaultKeyBinding.dict, as follows: "^\UF702" = "moveWordLeft:"; /* Ctrl + LeftArrow */ "^\UF703" = "moveWordRight:"; /* Ctrl + RightArrow */
3) But when I use ctrl-arrow in TextMate, I get instead 'moveSubWordLeft/Right:' (as proved by the macro recording)
4) If I create a custom command through 'Bundle Editor' for 'moveWordLeft/Right:' and bind it to the ctrl-arrows, those keys now do nothing
5) If I bind alt-arrow to "moveSubWordLeft/Right:", I still get "moveWordLeft/Right:".
So, the problem seems to be that the bindings in DefaultKeyBinding.dict are not sticking. But other commands I have assigned *are* working, for example: "\UF72C" = "pageUp:"; /* PageUp */ "~\UF72C" = "scrollPageUp:"; /* Option + PageUp */ "\UF729" = "moveToBeginningOfLine:"; /* Home */ "@\UF729" = "moveToBeginningOfDocument:"; /* Cmd + Home */
Any suggestions as to what I might be doing wrong? All help is much appreciated.
Thanks! Iain
Allan Odgaard-4 wrote:
On 15 Jul 2010, at 04:29, ijmcf wrote:
[...] I would like to change the bindings of ctrl-arrow to do the latter, but I don't know the name of the command to bind to in DefaultKeyBinding.dict (the former seems to be MoveWordLeft/Right or MoveWordForward/Backward).
You can start a macro recording then use ⌃→ followed by stopping the macro recording and saving it. Here you can then see the selector recorded, which is moveSubWordRight:.
textmate mailing list textmate@lists.macromates.com http://lists.macromates.com/listinfo/textmate