3

Is there a way to make Cmd+1 switch to the first tab, Cmd+2 to switch to the second and so on..?

I'd much rather not use SIMBL..

David
  • 597
  • 2
  • 8
dbr
  • 5,107
  • 5
  • 27
  • 37
  • 1
    As an aside: Ctrl-Tab goes to the next tab. – Arjan May 08 '10 at 16:38
  • wow, this is so annoying. wish there was a simpler way than the ones listed below as of 7/2011. – cwd Jul 07 '11 at 19:18
  • FWIW, I've been using Chrome which uses Cmd+1..9 for switching tabs, and a few other things I missed from Firefox (like middle-clicking tabs to close them) – dbr Mar 08 '12 at 12:56

5 Answers5

2

One (still relatively hacky) option would be to assign shortcuts to AppleScripts like this:

tell app "Safari" to tell window 1 to set current tab to tab 1

---

tell app "Safari" to tell window 1 to set current tab to last tab

You could use Automator services or third party apps like FastScripts or Keyboard Maestro to assign the shortcuts.

Lri
  • 40,894
  • 7
  • 119
  • 157
bVs
  • 21
  • 3
  • 2
    Without FastScripts, one could go nuts by registering a handler for [a dedicated URL protocol](http://www.macosxautomation.com/applescript/linktrigger/index.html). Then, in Safari, bookmarks those `tabx://` links in the first 9 slots of the bookmarks bar. ;-) Or, less adventuristic: create an Automator "service", like described in [How can I program the function keys on my MacBook?](http://superuser.com/questions/72468/how-can-i-program-the-function-keys-on-my-macbook/97813#97813) – Arjan May 08 '10 at 17:03
  • You can also use [QuickSilver](http://qsapp.com) to associate a keyboard shortcut to an AppleScript, see [this question](http://superuser.com/questions/468595/xcode-multiple-key-bindings-per-function) for more details. – edymtt Dec 31 '12 at 09:06
1

Check this new plugin (OSX Lion only):

Safari Tab Switching is a Safari SIMBL plugin which allow switching between tabs using Cmd+1-9.

Diogo
  • 30,192
  • 65
  • 150
  • 222
0

Technically, there is no real non-hacky solution, but you can always use cmd + shift + (left or right arrow key) to switch the tab on the left or the tab on the right. I've always found that useful.

Lucas
  • 413
  • 1
  • 4
  • 17
0

You want to use https://github.com/rs/SafariTabSwitching . If you find it does not work on later versions of OSX or Safari (I have it running on v8), you can look at https://github.com/rs/SafariTabSwitching/issues/27

Prasanth
  • 657
  • 3
  • 8
  • 14
-2

Safari > Preferences > Tabs > "Use cmd-1 through cmd-9 to switch tabs"

Kasper
  • 103
  • 2