OS X: Safari’s “Close Other Tabs” Option

One of the Safari features I use frequently is “Close Other Tabs.”

File menu

The way it works is this: When you’ve got multiple tabs open, click on the “File” menu. If you hold down the Option key, “Close Tab” will switch to “Close Other Tabs,” as shown above. This is neat if you’ve opened up a ton of stuff and just wanna get rid of everything except the tab that you’re currently viewing!

And as you’ll note, the keyboard shortcut for this action is Option-Command-W.

File menu

You can also hold down Option and click on the “x” that’ll appear on your tab when you hover over it. A little tooltip will show up when you do so, warning you of what’s about to happen.

Option-Click Tab

Finally, if you’re playing around and accidentally close a tab, you should know that you can press Command-Z (Edit > Undo Close Tab) to bring it back. I use that all of the time, too, but mostly because I’m just clumsy.

3 thoughts on “OS X: Safari’s “Close Other Tabs” Option

  • Here are two simple Applescripts some may find useful. The first script will close all tabs to the left of the current tab; the second script all tabs to the right of the current tab….

    tell application “Safari” — close tabs left of current tab
    tell front window
    repeat (index of current tab) – 1 times
    close first tab
    end repeat
    end tell
    end tell

    tell application “Safari” — close tabs right of current tab
    tell front window
    repeat (count every tab) – (index of current tab) times
    close last tab
    end repeat
    end tell
    end tell

  • “Undo close tab” doesn’t always work for me (even if I just closed a tab… I’m pretty sure anyway). I haven’t figured out when it does and when it doesn’t. It may have to do with the content of the tab. Or I could be mistaken. Anyone else notice that? I always look at it as a bonus when it works.

  • Melissa teaches the depth of Mac OS to me yet again!

    Finally, if you’re playing around and accidentally close a tab, you should know that you can press Command-Z (Edit > Undo Close Tab) to bring it back. I use that all of the time, too, but mostly because I’m just clumsy.

    I totally did not know this, and was always wondering if I could when being ‘clumsy‘.
    Of course, Command-Z!
    Duh…
    Thanks again!

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

WIN an iPhone 16 Pro!