Working on a Mac

How to close all tabs at once on Mac

You can do this with Note My in one move. Here is exactly which tabs each bulk close takes, which one asks you once rather than thirty times, and how to take a discard back.

A working session accumulates tabs. You opened three files to check something, then a log, then the config that explained the log, and now the strip scrolls. You want the window back — without being asked thirty times whether you meant it, and without losing the one file you had been editing for an hour.

Note My has five bulk closes and they are not interchangeable. This guide sets out which tabs each one takes, which one asks a single question, what happens to unsaved work, and how long you have to change your mind.

The five bulk closes

All five live on the tab context menu. Right-click — or ⌃-click — any tab to open it. The tab you right-clicked is the anchor, and three of the five are defined relative to it.

The five bulk close commands and the exact set of tabs each one closes
CommandWhat it closes
Close Other TabsEvery tab except the one you right-clicked.
Close Tabs to the RightEverything after the anchor in the strip. Right-click the tab you want to become the new end of the strip.
Close Tabs to the LeftEverything before the anchor. Right-click the tab you want to become the new start of the strip.
Close Saved TabsEvery tab with no unsaved changes.
Close All TabsEvery tab in the window.

Left and right are positions in the tab strip, not recency. If you have dragged tabs around, the sets follow the strip as it looks now.

Note

There are two different Close All Tabs. The one on the tab context menu asks about each unsaved file in turn. The one in the File menu, ⇧⌘W, asks once for the whole set. They are separate commands with different behaviour.

What "saved" means for Close Saved Tabs

This is the command people misread, so it is worth being exact. Saved means "has no unsaved edits" — not "has a file on disk". Two consequences follow:

  • A clean untitled tab is closed by it. A tab you created and never typed into has nothing unsaved, so it counts as saved and goes. That is usually the blank tab you opened by accident, and it leaves without asking you anything.
  • A file that exists on disk but has unsaved edits is left alone. The command takes away everything you have finished with and leaves everything you have not.

It also leaves alone any tab that has lost the file it came from, so a stray tab is never swept up this way. If a tab survives and you cannot see why, that is the second reason.

The unsaved marker is a leading asterisk on the tab title, which also appears in the title bar. Do not confuse it with the orange dot: the orange dot means the file changed on disk, not that you have unsaved edits.

One question instead of one per file

For a window you genuinely want emptied, use the File menu.

  1. Press ⇧⌘W

    That is File ▸ Close All Tabs. Unlike the closes on the tab context menu, it presents a single sheet up front covering every unsaved tab at once.

  2. Choose Save All, Discard All, or Cancel

    Save All writes every unsaved tab and then closes the window's tabs. Discard All throws the unsaved edits away and closes. Cancel stops before anything is closed.

  3. If a save fails, the close aborts

    Under Save All, a file that cannot be written stops the whole operation and the remaining tabs stay open. You are not left half-closed with an error you missed.

Two things are worth knowing about what happens afterwards. Whatever is still open when the sheet has been answered — a pinned tab that refused, say — stays exactly as it was, so the window in front of you is the window you asked for. And the decision you made is the one that holds: our auto-recovery safety net stands guard over work you never got the chance to decide about, and when you have decided, Note My takes you at your word. All of it stays on your Mac — nothing is uploaded and there is no account.

The five bulk closes on the tab context menu are the file-by-file counterpart. Each unsaved tab in the set gets its own Save / Cancel / Don't Save prompt, so you can keep one file, write another and drop a third as the window empties. Reach for those when the decisions differ per file, and for ⇧⌘W when they do not.

Pinned tabs survive every close

Pinning is the deliberate exemption. A pinned tab is held at the front of the strip, keeps its place there however you reorder the rest, and refuses to close — it stays where it is and you hear a beep. A small pin badge shows which tabs are protected.

Every pinned tab announces itself during a bulk close: one beep for each tab that refuses. Close a set containing three pinned tabs and you get three beeps and three survivors, each still wearing its pin badge, so you can count what stayed without reading the strip. To close a pinned tab, unpin it from the tab context menu first and close again.

Pinning is worth using on purpose. Pin the two or three files you keep returning to and every bulk close on this page becomes safe to reach for.

Closing one tab that has unsaved changes

⌘W closes the active tab. You can also click the close button, which sits at the leading edge of the tab and stays hidden until you hover over it.

If the tab has unsaved edits you get Save / Cancel / Don't Save. There is one case where you get something else. If the file was moved, renamed or put in the Trash while the tab was open, the tab is kept rather than silently closed: its title becomes Foo (missing) and ⌘S offers Save As, so your next save names a fresh destination. Your text is still in front of you; you only have to say where it goes.

One behaviour to expect: after a close, the tab to the left of the closed one is selected. Closing a background tab therefore moves you.

The five seconds after a discard

Choosing Don't Save is not quite final. A glass pill appears at the bottom of the window reading "Discarded «Foo.swift» — restore?" with a Restore button and a countdown. Click Restore and the tab comes back with its content, titled with the asterisk that marks it unsaved.

The details that matter:

  • Five seconds, exactly. The countdown is on the pill and ticks down once a second. Whichever comes first — your click or the last tick — is the answer.
  • It waits without interrupting. The pill never takes over the window or steals a keystroke from what you are typing. Carry on, and click it only if you want the tab back.
  • It always follows your latest discard. Discard a second tab while a pill is live and the pill moves to that one, so the tab you have just let go is always the tab on offer.
  • Long names are shortened in the middle, so you can still tell which file the pill is offering back.

Let the countdown lapse and the discard stands, exactly as you asked. The file on disk is untouched throughout: discarding drops the edits you had not written, never the file itself, so reopening it hands you the last version you saved, byte for byte. That is the quiet promise behind every close on this page — the strip changes, the folder does not.

Choosing the right one

  • Keep the file in front of you and drop the rest — Close Other Tabs.
  • Walk back along a trail of files you opened chasing something — Close Tabs to the Right, or to the Left if the trail grew that way.
  • Half reference, half live edits — Close Saved Tabs clears the reference and leaves the work.
  • Done for the day — ⇧⌘W. One question.

Habits that make this quick

Once the five closes are familiar, a short routine does most of the work for you:

  • Learn the two shortcuts. ⌘W for the tab in front of you, ⇧⌘W for the whole window with a single question. Between them they cover what you do most, and the five bulk closes are one right-click away on the tab context menu whenever the situation calls for something more precise.
  • Pin the files you always want. A pinned tab holds its place at the front of the strip and stays through every bulk close, so Close Other Tabs and Close All Tabs become commands you can reach for without a second thought about your reference files.
  • Run Close Saved Tabs between tasks. Treat it as a tidy-up rather than a last resort. It takes away everything you have finished with, keeps every tab that still holds unwritten edits, and clears the blank untitled tabs you opened by accident without asking you anything.
  • Trust the five seconds. Close a tab, choose Don't Save and glance at the pill: if your hand moved faster than your mind, Restore puts that tab back with its text intact. The countdown exists so that a quick decision is still a reversible one.
  • Closing a tab never touches the file. Emptying a window is a view operation from start to finish. Removing a file from disk is its own deliberate command — File ▸ Move to Trash… — so nothing on this page can cost you a file on your Mac.

Troubleshooting

Close Saved Tabs left tabs behind

Each survivor either has unsaved edits or has lost the file it came from. Look for the leading asterisk on the title. Save those tabs, or close them individually and answer the prompt. The orange dot is a different signal — it means the file changed on disk while you had it open.

I heard a beep and nothing closed

Those tabs are pinned. Unpin them from the tab context menu and repeat the close. One beep is emitted per pinned tab, so a run of beeps tells you how many refused.

It asked me about every single file

You used Close All Tabs from the tab context menu, which prompts per unsaved tab. The File-menu version, ⇧⌘W, has the single up-front sheet.

The close stopped part-way through

Under Save All, a failed write aborts the operation rather than continuing past it. Find the file that could not be written — a read-only volume, a folder you have not granted access to, a disk that filled — save it elsewhere with File ▸ Save As…, then close again.

Closing an inactive tab switched my editor

Expected. The tab to the left of the closed one becomes active, whether or not you were working in the tab you closed.

The Restore pill disappeared before I could click it

The pill runs for five seconds and always follows your most recent discard, so a second discard passes it on to the newer tab. Reopen the file from disk and you have everything back except the edits you chose to drop; the saved version on your Mac was never altered.

Frequently asked questions

What is the keyboard shortcut to close all tabs?

⇧⌘W, which is File ▸ Close All Tabs. It is the variant that asks once for the whole window rather than once per unsaved file. ⌘W closes only the active tab.

Will closing all my tabs lose unsaved work?

You are asked first, every time. ⇧⌘W presents Save All, Discard All or Cancel before anything closes, and a failed save under Save All stops the operation so you can deal with it. If you do discard, the file on disk is unchanged — only the edits you had not written go, and reopening the file hands you the last version you saved. When you close a single tab and choose Don't Save, the Restore pill gives you five more seconds to take that one back.

Why won't one of my tabs close?

It is pinned. Pinned tabs are held at the front of the strip and reject close requests with a beep. Unpin it from the tab context menu and it closes normally.

Can I get a tab back after I closed it?

For five seconds after choosing Don't Save, yes: a pill reading "Discarded «Foo.swift» — restore?" appears with a Restore button, and the tab returns with its content. After that, or if you discarded a second tab meanwhile, reopen the file from disk.

Does Close Saved Tabs close empty untitled tabs?

Yes. "Saved" means the tab has no unsaved edits, so an untitled tab you never typed into qualifies and is closed. A tab with unsaved text is kept even though it has never been written to disk.

Do my tabs come back the next time I open the app?

A session that ended unexpectedly comes back, including unsaved text — that is our auto-recovery safety net, and it works entirely on your Mac, with nothing uploaded and no account. When you close a window on purpose, Note My takes you at your word and gives you the clean start you asked for.