7

I am used to doing Ctrl-Shift-Tab to cycle through tabs.

I do slowly pick up the niceness about using Cmd-Shift-[ or ] to do the same on the Mac.

I have currently set TextMate to take Ctrl-Shift-Tab to do the tab cycling, but I'd want the Ctrl-Shift-[ or ] in addition to that to perform tab cycling. Is this possible?

The reason I ask is because I see that Chrome can do it both ways (not through any configuration of my own of course).

  • Probably not. You can assign any other shortcut to a Menu command through System Preferences » Keyboard » Keyboard Shortcuts, but that will overwrite the default. E.g. assigning ⌃⇥ to Next File Tab will overwrite ⌘{. Chrome has just both. – slhck Mar 19 '12 at 9:58
  • If the app doens't use compiled nibs, you could add alternative shortcuts for example in /Applications/TextMate.app/Contents/Resources/English.lproj/MainMenu.nib. But I don't think there's any easier way to do it apart from using something like Keyboard Maestro. Even if you added multiple shortcuts to ~/Library/Preferences/com.macromates.textmate.plist directly, only one of them will work. – Lri Mar 19 '12 at 13:44
  • I see. I will go look into it and report back – Nik So Mar 19 '12 at 21:31
3

(I'm working at 10.11.4 environment, but I think this can work)

In my case, I have both external Screen and Keyboard (EN physical layout) attached to my MacBook Pro (ES physical layout).

Different keyboards, different keys
The thing is that the keys that I press to cycle through windows in the MacBook Cmd+§ are different from the External Keyboard Cmd+`.

So, I've forced to have two different shortcuts to achieve same action.

The solution
1. Go to: System Preferences… > Keyboard > Shortcuts (Tab) > Keyboard (section)
2. Select: Move focus to next window
3. Create: The first shortcut you prefer
4. Go to: System Preferences… > Keyboard > Shortcuts (Tab) > App Shortcuts (section)
5. Select: Finder (as target application)
6. Create: The second shortcut you prefer
7. Voilá

  • Despite my hesitation, this worked perfectly, thanks for sharing! – Kjellski Oct 18 '18 at 7:37
1

If in TextMate tab cycling is exposed through menu items, you can also use AppleScript and QuickSilver to add the shortcuts you need.

You can find detailed instructions in this answer for a similar question (adding a second shortcut for a command in Xcode)

0

The original question is generic and the answers are specific to the presenting problem of cycling through tabs. I had this problem for a very different keyboard shortcut.

In my case, installing MacVim added a Service of “New MacVim Buffer With Selection” and I have had the keyboard shortcut of Ctrl+Shift+M set there for several years and I'm very used to using it.

But this one proprietary app was not accepting the Ctrl+Shift+M hotkey. I could change the hotkey to a wide variety of other key combinations, e.g., Ctrl+Shift+2 or Ctrl+Shift+, and it would work just fine. Something about this one hotkey was not working and the app has no mechanism for custom hotkeys.

The issue for me is that my fingers remember Ctrl+Shift+M and I didn't want to have to relearn that in all other contexts just to be able to use the command in this one proprietary app. I thought maybe I could somehow duplicate the Service and assign a different hotkey to each insance, but other threads convinced me that this was not a good option.

The solution from Darboscalante gave me the clue I needed.

In the Shortcuts window under App Shortcuts it’s possible to set an app-specific hotkey for any existing menu item in an app. And “New MacVim Buffer With Selection” does indeed appear in the apps Services menu. My own personal Services are there too. I added an App Shortcuts entry for the app, used the exact menu item name, set that to Ctrl+Shift+, (comma, next to the M), and voilá, both shortcuts would open a MacVim window containing the selection.

This is a more generic solution to the original problem: The Services menu can have one hotkey and the App Shortcuts can call the same Service with a different hotkey.

For my specific purpose I discovered that I could put Ctrl+Shift+M in the App Shortcuts so now I have the same shortcut in all contexts and my (different) problem is solved, too.

I hope this helps.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.