Skip to content

Tabs and windows

Keep several documents in one window, or split their tabs into two groups to compare files. A split can be side by side or stacked.

Action Default shortcut
New tab in the current window ⌘T
New independent window ⌘N
Split to the right ⌘\

  • ⌘T, or File > New Tab, adds a tab with a new, empty document — the same one File > New gives you. To add a tab of another type, press ⌘⇧T or right-click a tab or an empty part of the title row and choose from New Tab (see below).
  • ⌘N always opens a separate window, whatever the system’s Prefer tabs when opening documents setting says (System Settings > Desktop & Dock) — Space’s windows never join the system’s own tab bar, so the strip at the top is the only one you’ll see; so does File > New with a specific type.
  • Double-clicking a supported file, choosing Space from Open With, dropping a file on Space’s Dock icon, the space command line tool and ⌘O all open into the current window’s tab strip — in a split window, into the group you’re working in. With no window open, the file gets a window of its own. A file that’s already open is brought forward instead of being opened twice, even when it’s in the other group.
  • Drag files from Finder into the editable text area to open them in the window you dropped on. Each file gets a tab in Finder’s order, a file that is already open comes forward, and folders are skipped. Hold ⌥ while dropping to open the files in separate windows instead.
  • View > Split Right (⌘\) and View > Split Down (Option-⌘\) divide your open tabs evenly between two groups to the right or below — see Two groups in one window.
  • ⌘W closes the current tab (in a split window, the one you’re on in the group you’re working in), and closing the last tab closes the window. Ask to Save in Settings > General > When closing unsaved documents asks about each edited document you close.

The strip shares the window’s title row: the traffic-light buttons on the left, the tabs next to them, and Quick Menu at the right end. The window’s title text is no longer drawn there — the tab you’re on is what the window is showing. Dragging the empty part of the strip still moves the window, and View > Hide Toolbar hides the toolbar at the right end of it — in that window only; Show toolbar in Settings decides how new windows start.

In full screen, View > Hide Top Bar (⌃⌘T) hides that whole row, including the tabs, single-document title, and toolbar icons. The document fills the space it leaves. In a top-and-bottom split, the lower group’s tab row also hides. Use the same shortcut or View > Show Top Bar to bring the rows back; tab-switching shortcuts still work while they are hidden. Editor > Window defaults > Show Top Bar in Full Screen sets how each full-screen session begins and is on by default. The menu or shortcut changes only the current window until you leave full screen; entering full screen again follows the setting. The command is unavailable in a normal window or while presenting.

A group with only one document doesn’t show its strip at all: it looks like any other single-document window, with the document’s icon, name, and mark (see below) starting at the left edge of that group’s title area. That part of the title row is the same color as the text below it, so the group reads as one surface. The strip appears as soon as a second tab arrives — ⌘T, a file opened into the group, or a tab dragged in — and folds back into the left-aligned name when the group is down to one again. The text below doesn’t move either way. Double-clicking the title row zooms or minimizes the window, following Double-click a window’s title bar to in System Settings > Desktop & Dock.

A tab is as wide as its name needs rather than a share of the strip, tabs sit flush against each other, and the selected one has exactly the background of the text below it — in any theme, light or dark — while the strip behind the other tabs is a shade off from it. When the tabs stop fitting, the strip scrolls sideways; hovering over a tab reveals its × button.

A tab’s title is the document’s name, with the file’s icon — the same one Finder shows — to the left of it once the document is saved to a file; an untitled document has no icon. With only one tab, the left-aligned name in the title row carries the icon too. If two tabs in the same window would show the same name, the parent folder is added after it (notes.md — src), so you can tell them apart without hovering; the window title that the Window menu and Mission Control show carries the same name.

The right end of a tab carries at most one mark at a time: a green dot while the document has edits that aren’t written to the file yet, or a lock when the document is read-only — a binary property list shown as converted XML, a file Space can’t read as text, or an encoding whose bytes can’t be written back unchanged. A large mapped text document is not locked just because it is large. When both marks can apply you see the unsaved mark, since that’s the one that can still cost you something. Open and save files covers what read-only means for a given file.

Click a tab to switch to it, or press Shift-Command-] and Shift-Command-[ (Window › Show Next Tab and Show Previous Tab, the same keys as tabs everywhere else in macOS) to move to the next or previous tab, wrapping from the last back to the first. The keys work the same with a Chinese or other input method switched on. Control-Tab and Control-Shift-Tab do the same. In a split window all of these stay within the group you’re working in. With only one tab open (in that group), the two menu items are greyed out, and Control-Tab keeps its usual macOS meaning and moves keyboard focus out of the text, the same as in any other window. Drag a tab left or right to reorder the strip: the tab moves along with the pointer and the others slide aside to show where it will land.

With Keyboard navigation turned on (System Settings > Keyboard), the system shortcut Move focus to the window toolbar puts keyboard focus on the tab strip — Control-F5 unless you’ve changed it under System Settings > Keyboard > Keyboard Shortcuts… > Keyboard, and Space follows whatever you’ve set there. View › Move Focus to Tab Strip does the same from the menu bar, with Control-F5 as its own key; you can give it a different one in Settings > Shortcuts. Pressing a key both of them share moves focus once, not there and straight back. The Left and Right arrow keys then move between tabs, Tab moves on to the toolbar icons, and Escape, or the same shortcut again, puts focus back in the text. With only one tab there’s no strip to move to, so the menu item is greyed out and the shortcut does nothing.

Close the current tab with ⌘W, or close whichever tab you’re pointing at with its close button or a middle-click on it — the tab under the pointer doesn’t have to be the one you’re on. An edited tab keeps its solid dot on hover; clicking that dot closes it. Close the whole window with File > Close Window (⇧⌘W); Space asks about edited tabs in the order you see them.

Each tab keeps its own place while you work elsewhere: scroll position, source or rendered view, selection and undo history all belong to the tab, so switching back and forth doesn’t lose anything. Settings changes still reach every open window and every tab at once.

A window can split into two groups, each with its own tab strip, so two documents sit side by side (or one above the other) without a second window to arrange.

Space showing a Markdown document and JSON source side by side, with a divider and both document titles visible.
Drag the divider to resize the two groups. Click a document to focus its group.
Task What to do
Split open tabs With at least two documents open, choose View > Split Right or View > Split Down. The active tab stays selected. The first group gets the extra tab when the count is odd.
Split off one tab Drag it over the right or bottom third of the text. The shaded half shows where the new group will open.
Resize or switch groups Drag the divider, or double-click it to make groups equal. Click a group’s text, or focus the first or second group with Control-1 or Control-2.
Move a tab Choose View > Move to Other Group, or drag the tab to the other group’s strip or text.
Switch orientation or merge Use View > Toggle Split Orientation or View > Merge Groups. Merging keeps the visual order of the groups.

A group with one document shows its name. A group with more documents shows tabs. Opening or closing documents acts in the group with keyboard focus. Closing its last tab removes the group. When Ask to Save is active, quitting restores still-open windows and their splits on the next launch.

Control-1 and Control-2 and Mission Control. macOS has shortcuts to switch to Desktop 1 and Desktop 2 that use the same keys (System Settings > Keyboard > Keyboard Shortcuts… > Mission Control). They’re off unless you’ve turned them on; if you have, macOS takes Control-1 and Control-2 before Space sees them, and the Focus items do nothing from the keyboard. Give them other keys in Settings > Shortcuts — they’re among the commands you can change there.

Choose Move Tab to New Window from the tab or Window menu, or drag the tab outside the window. Drop it on another window’s tab strip to move it there. In full screen, use the menu command to open a separate window. A drag over the current window can still split, reorder or move tabs between groups.

When a window holds only one document, dragging its name (or its mark) moves the whole window with the pointer, and carrying it over another window’s strip merges it into that window the same way, closing the window it came from. Dragging the rest of the title row is an ordinary window drag, so it still snaps and tiles the way macOS windows do — it just doesn’t merge.

Press Escape before you let go to call the drag off: the tab goes back where it was, a window you were dragging goes back to its place, and a tab you’d already pulled out goes back into its original window.

A Space window with several file tabs and a tab’s context menu open.
Right-click a tab to choose close, move or split actions for that tab.

Right-clicking a tab acts on the tab you clicked, not on the tab you happen to be on:

  • Close Tab, Close Other Tabs, Close Tabs to the Left, Close Tabs to the Right — close the clicked tab, the other tabs, the tabs to its left, or the tabs to its right, respectively. A tab with unsaved changes is handled the way a window with unsaved changes is.
  • Close Saved Tabs closes every tab that has no unsaved changes, and Close All Tabs closes every tab. In a split window these, like the four above, act on the group of the tab you clicked, not on the whole window, and a group they empty folds away. With Ask to Save, each tab with unsaved changes asks whether to save; cancel one and the rest stay open, while the tabs already closed stay closed. Close Saved Tabs is greyed out when every tab (in that group) has unsaved changes.
  • Copy Path and Show in Finder — the same two File menu commands: the document’s full path on the clipboard, or a Finder window with the file selected.
  • Rename… and Move To… — rename the file or move it to another folder, the same commands the File menu offers. For a tab you’re not on, Space switches to it first, so the sheet that asks for the new name or folder sits over the document it’s about.
  • Share and Reopen with Encoding — the same submenus as in the File menu, for the document you clicked. Both are greyed out for a document that hasn’t been saved to a file yet.
  • Show Preview or Show Source — on a Markdown or diagram tab only: switches that tab between its source and its rendered view, the same as View > Toggle Source and Preview or the toolbar icon. Doing it on a tab you’re not on leaves you where you are; the tab shows the other view when you switch to it.
  • Split Right and Split Down — divide all open tabs evenly between two groups to the right or below, keeping the tab you clicked selected, the same as the View menu items. Greyed out when it’s the window’s only tab. In a window that’s already split they’re replaced by Move to Other Group, which moves only the tab you clicked to the end of the other group.
  • Move Tab to New Window — moves the document out of the window into one of its own.
  • New Tab — a new, empty document of the type you pick, added to this window (in a split window, to the group of the tab you clicked) as a tab and selected. The list is your default type plus Plain Text, Markdown, Diagram, Whiteboard and Mind Map; your templates stay in File > New Tab. The first item is your default type, the same thing ⌘T gives you. This is how you get a tab of another type without changing the default first — and ⌘⇧T opens this same list straight away, without the right-click.

File > Close Tabs to the Left, File > Close Tabs to the Right, File > Close Saved Tabs and File > Close All Tabs do the same thing for the window you’re in — in a split window, for the group you’re working in — next to File > Close Tab and File > Close Window. The first two are greyed out when the current tab is already the first or the last one in its group, Close Saved Tabs when every tab there has unsaved changes, and all four when the front window isn’t a document window at all.

Right-click the title row outside a tab to find New, New Tab, and the toolbar controls described below.

The title-row context menu with available toolbar buttons and Quick Menu checked.
Right-click the title row, then choose an item to show its button in the toolbar.

By default, Quick Menu (the ellipsis icon) is the only toolbar icon. The Page Width submenu has a width icon. Its menu keeps commands in the same places for Markdown preview, Markdown source, and other files: switch between source and preview, change page width, format, share, print, show line numbers, wrap lines, show or hide the status bar, zoom, reset view settings, use Terminal, present, and enter or exit full screen. Terminal shows or hides the embedded panel in the Direct version and opens the selected external terminal in the Mac App Store version. Commands that do not apply to the current document stay visible but are greyed out.

Right-click anywhere in the title row outside a tab — on a toolbar icon, between the icons, or on the empty part of the row — and the menu ends with one row for every icon that can go there: Page Width, Source and Preview, Format Document, Share, Publish, Print, Status Bar, Terminal, and Quick Menu. A checkmark means the icon is shown; choose a row to show or hide it. In the Mac App Store version, the Terminal icon opens the selected external terminal at the configured starting directory. An icon that only applies to some documents — Page Width on rendered Markdown — appears only there, even when it’s checked. Quick Menu can’t be hidden, so the toolbar is never empty. Use Default Toolbar returns to the single Quick Menu icon. Existing custom layouts keep their chosen icons and order.

To rearrange the icons with the mouse, hold Command and drag an icon left or right, the same as in Finder and Safari; a line shows where it will land. Dragging it out of the toolbar doesn’t remove it — hide it from the right-click menu instead. Press Escape while dragging to cancel. Your choice applies to every window and is remembered.

Every toolbar icon also has a command in the menu bar, so hiding an icon never hides what it does: View > Toggle Source and Preview, View > Page Width, View > Show Status Bar, Format > Format Document, File > Share, File > Print…, and the other Quick Menu commands under View. Commands such as line numbers, wrapping, and zoom remain in Quick Menu and the menu bar; they do not add toolbar icons.

Right-clicking the title row anywhere outside a tab — the empty end of the tab strip, the space between the traffic-light buttons and the first tab, the gaps between the toolbar icons, or, in a window with a single document, anywhere along the title row including the document name — shows a menu that starts with two submenus: New, the same as File > New, which opens the new document in a window of its own, and New Tab, which adds it to this window as a tab. The rest of that menu is the toolbar list described above. In a split window, New Tab uses the group under the place you clicked; the lower strip in a stacked split belongs to the lower group, and its menu has only the two submenus because the toolbar is at the top. Right-clicking never starts a window drag or a tab drag; dragging and double-clicking the title row work as before.

⌘⇧N and ⌘⇧T open those two lists without the right-click — the window list and the tab list, in that order. These shortcuts are keyboard-only; they do not appear as File menu items. Both come up just below the leading edge of the tab strip, and picking an entry does exactly what the submenu entry does: ⌘⇧N gives the document a window of its own, ⌘⇧T adds it to the group you are working in. ⌘⇧N works with no document window open as well — it is the one that opens a window — while ⌘⇧T is greyed out when there is no document window to put the tab in.

  • The window title is still used by macOS even though it isn’t drawn in the window any more: the Window menu and Mission Control show the tab you’re on, with — Read Only after the name for a read-only document.
  • There’s no grid view of every open tab (the Show All Tabs some Mac apps have); when the strip is visible, switching is a click. A strip that has outgrown the window scrolls sideways.
  • A split is for the moment: when you’re done comparing, View > Merge Groups or closing one side’s tabs brings the window back to one group.
  • ⌘N and ⌘T are the two halves of the same decision: ⌘N when the new document deserves its own window, ⌘T when it belongs with what you have open. ⌘N and File > New are not affected by the system’s tab preference, so they always mean “a window”.
  • Editor — Show toolbar, Show status bar, Show Top Bar in Full Screen, and the rest of the window’s furniture. See Settings.
  • General — the new document a tab starts as follows the Documents group: New document type, New document encoding and New document line endings. See Settings.
  • Tabs follow the system’s light, dark and high-contrast appearance and the same settings as any other window.