Tab preferences in macOS

There’s a global setting in macOS (in the General pane) where you can choose to “Prefer tabs” in all applications.

This means that any time a new window would get created, you get a new tab instead. Which I love for Terminal, because I hate getting swamped by random windows. But I hate how it changes Safari’s behaviour — with this setting enabled, pressing Ctrl-N suddenly becomes identical to Ctrl-T and makes a new tab… which is both annoying and pointless.

But it turns out, you can avoid this and turn on “prefer tabs” for individual applications… most (maybe all, but I’m not sure) applications support a setting called AppleWindowTabbingMode. For example, to make only prefer tabs every time a new window is created, just use this command:

defaults write AppleWindowTabbingMode -string always

The defaults write command is basically a way of changing macOS settings through the command line, even ones that don’t have a GUI for. For some more background, check out OS X Daily’s explanation and list of a few other useful commands.

Tom Charman Mastodon