You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

如何为Safari的Tabs偏好设置添加选项?自定义command-T新建标签页位置

Hey Sean, great questions—let’s tackle these one by one, since Safari hides a lot of useful tab settings behind the scenes.

让Command-T新建标签页在当前标签右侧打开

Safari doesn’t expose this option in its regular Preferences panel, but we can enable it using a Terminal command. Here’s how:

  • Open Terminal (you’ll find it in Applications/Utilities or via Spotlight with Command+Space)
  • Paste this command and hit Enter:
    defaults write com.apple.Safari TabCreationLocation -int 1
    
  • Quit Safari completely (right-click its dock icon and select "Quit"), then reopen it.

Now when you hit Command-T, new tabs will pop up immediately to the right of your current tab instead of the far end of the tab bar. If you ever want to revert to the default behavior, just run this command instead:

defaults write com.apple.Safari TabCreationLocation -int 0

Or to reset it entirely:

defaults delete com.apple.Safari TabCreationLocation
为Safari的Tabs偏好设置添加自定义选项

Unfortunately, Apple doesn’t let users modify Safari’s native Preferences pane directly—those options are hard-coded into the app’s bundle, so there’s no way to add new checkboxes, dropdowns, or sections there. But there are workarounds to get similar functionality:

  • Use Terminal aliases: Create shorthand commands for your favorite hidden tab settings, so you don’t have to type the full defaults commands every time. For example, add this to your ~/.zshrc or ~/.bash_profile file:
    alias safari-tab-right="defaults write com.apple.Safari TabCreationLocation -int 1 && killall Safari"
    alias safari-tab-end="defaults write com.apple.Safari TabCreationLocation -int 0 && killall Safari"
    
    After saving, run source ~/.zshrc (or the corresponding file for your shell) to apply the changes. Now you can just type safari-tab-right in Terminal to switch the setting quickly.
  • Create a quick-access shortcut: Use Automator to build a small app that runs the Terminal command for you. You can even add this app to your dock for one-click access:
    1. Open Automator, select "Application" as the document type
    2. Drag the "Run Shell Script" action into the workflow
    3. Paste the defaults command plus killall Safari into the script field
    4. Save the app (name it something like "Safari Tabs: Right Side")
  • Use third-party tools: Apps like Alfred or Raycast let you create custom shortcuts that run these commands without opening Terminal at all.

内容的提问来源于stack exchange,提问作者Sean

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.19 04:02:27