Multi-row tabs: wrap tabs to additional rows when the tab bar overflows #58082
daniilsimakhin
started this conversation in
Feature Requests
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Body
Multi-row tabs: wrap tabs to additional rows when the tab bar overflows
Problem
Currently, when the number of open tabs exceeds the tab bar width, Zed switches to horizontal scrolling. This works for a small number of overflow tabs, but breaks down in common real-world scenarios:
index.php,User.php,Controller.phpin nested folders).The result is that experienced users coming from JetBrains, Visual Studio, or VS Code (with
editor.wrapTabs) feel a noticeable productivity regression in Zed for projects with many open files.Current workarounds and their limits
I am aware of and use the following, but each has limits:
max_tabs— auto-closes old tabs. Helps, but you lose context: a file you actually want to keep open gets closed without warning.tab_bar.show_pinned_tabs_in_separate_row(#46573) — excellent step in the right direction. Solves the pinned-vs-working tabs split, but doesn't help when the working row itself overflows.Cmd+E/ Recent Files, Tab Switcher — useful for navigation, but it's a modal popup. It doesn't give you the constant peripheral awareness of "what's open right now" that a visible tab bar does.Proposed solution
Introduce an opt-in setting that wraps tabs onto additional rows when the tab bar overflows, instead of (or in addition to) horizontal scrolling.
Suggested setting shape (consistent with the existing
show_pinned_tabs_in_separate_row):{ "tab_bar": { "wrap": "off" | "on" | "auto", "max_rows": 3 } }wrap: "off"(default) — preserves current single-row behavior. Zero impact on existing users.wrap: "on"— tabs always wrap to additional rows as needed.wrap: "auto"— wraps only when the number of tabs exceeds a threshold (or when horizontal scrolling would otherwise kick in).max_rows— optional cap. Beyond this number of rows, fall back to horizontal scrolling on the last row. Prevents the tab bar from consuming half the screen on extreme cases.Design notes
A few details worth deciding up-front:
show_pinned_tabs_in_separate_row: pinned tabs in row 1, working tabs wrapping across rows 2..N.Ctrl+Tab,Cmd+Alt+→/←, and similar should treat the wrapped rows as one logical sequence (end of row 1 → start of row 2).max_rowsis hit and horizontal scrolling kicks in on the last row, existing scroll buttons should keep working.Prior art
This is a well-established pattern in IDEs that target the same audience as Zed:
Settings → Editor → General → Editor Tabs → Show tabs in multiple rows.workbench.editor.wrapTabs(microsoft/vscode#32836, shipped 2021).The fact that all four major desktop IDEs converged on this feature suggests it's solving a real problem that single-row + horizontal scroll doesn't.
Why this fits Zed
Cmd+E, tab switcher, preview tabs all remain useful for their own use cases.Beta Was this translation helpful? Give feedback.
All reactions