9

I am switching to textmate and there are a few things I want to change. I have tried Googling for the answer, but haven't found a simple explanation for how to rebind shortcuts globally.

First, tab switching doesn't work with Cmd+Shift+{ and Cmd+Shift+} This works in nearly every other application (FF, Terminal, etc.)

How do bind those keys to switch tabs?

Second, I would like Ctrl+j/k/l/; to move the cursor, it it possible to rebind that command to the arrow keys?

Thanks in advance.

jcampbell1
  • 4,159
  • 3
  • 33
  • 35

1 Answers1

15

Yes. For the arrow keys, you can record a macro (Bundles > Macros > Start Recording, [press an arrow], Stop Recording, Save Last Recording. It'll make a macro with the one command moveLeft: or similar. Set a key equivalent and you're done.

For the tab switching, go to System Preferences > Keyboard > Keyboard Shortcuts and add new shortcuts for menu items called "Next File Tab" and "Previous File Tab". Restart TextMate, and you're done.

Sophie Alpert
  • 139,698
  • 36
  • 220
  • 238
  • I just got this working, but with one addition: Within System Preferences > Keyboard > Keyboard Shortcuts, I specified that my two new shortcuts should apply to Textmate only. Adding the shortcuts to All Applications (which seems to be the default under OSX 10.5) resulted in the new keyboard shortcuts doing nothing, and also broke "Cmd+Shift+{" and "Cmd+Shift+}". – Trevor Stow Nov 15 '10 at 14:26
  • Unfortunately with the shortcut change via the System Preferences it is only possible to change the primary shortcut (in case of "Next File Tab" this is cmd+alt+} by default), but not the "hidden" secondary shortcut, which is cmd+alt+right (simpler alternative for all the non-US keyboards). I wanted to use this secondary shortcut for something else, since I don't need the tab switching commands at all. – Alexander Klimetschek Jan 07 '11 at 20:57
  • You can use the program KeyRemap4Macbook to remap any keys in any way you like. For example, I remapped Command+CapsLock to Command+Option+Left and Shift+Capslock to Command+Option+Right. http://pqrs.org/macosx/keyremap4macbook/ – Brandon Jun 17 '11 at 23:23
  • Great answer. To get the tab shortcut keys working on OSX 10.9 and Textmate 2, you'll need to change the menu item names to: "Select Next Tab" and "Select Previous Tab". – gdavis Jun 11 '14 at 17:24
  • With TextMate 2 there's no need to restart it after creating or updating a shortcut. I'm not sure if this is due to TextMate itself or macOS (I'm in High Sierra at the time of writing). – elitalon Feb 03 '19 at 16:37