- 
                Notifications
    You must be signed in to change notification settings 
- Fork 5.8k
Editor tab bar settings #7356
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Editor tab bar settings #7356
Conversation
| Hey, thanks for a PR! we already have a setting section for tabs (see e.g #2739); I think your change would fit in better in that. | 
| 
 Oh, thank you for pointing out! I somehow missed that. I'll move the  | 
dea327e    to
    21a32e0      
    Compare
  
    | Hey @alygin, we actually had a PR open for this at one time, but it was blocked because the team wanted to ensure that the user had an alternative way to check on the state of their buffers when tabs are hidden. I'm not sure where everyone stands at the moment, but here is the PR with the additional info: Specifically, @maxbrunsfeld's comment: I'll let Max / the other devs chime in with their current thoughts on this. | 
| @JosephTLyons, thank you for pointing to the existing discussion on the subject! Unfortunately, I didn't see it before. I'll get back with my ideas / changes later. | 
| Filed a feature request: #7653 | 
| Also worthwhile to have a "merge" placement where the title bar is merged with the tab bar #5066 to reduce the editor footprint. This can be done in VSCode with the help of APC Customize UI++ but is quite buggy and affects the draggability of the title-bar, difficulty in aligning the traffic light buttons and forces you to use "native" windows on VSCode. This means the context menu has to be native instead of custom. | 
| @alygin are you still planning to work on this one? If not, I will close to tidy up our PR queue. | 
| @ConradIrwin, yes, I'm absolutely committed to this task. This PR is waiting for the TabSwitcher to be implemented. And the tab switcher is pretty close, it's waiting for a couple of other PR's to be merged. I started all this TabSwitcher thing just to be able to merge this PR and hide the tab bar :) Though you can close it if it's a burden to keep it in the queue. I'll reopen as soon as all the prerequisites are ready. | 
| Sounds good! Happy to work with you on any of this (there are some slots at
https://calendly.com/conradirwin/pairint, but if none work for you let me
know ***@***.***)
conrad… On Wed, Mar 13, 2024 at 11:31 AM, Andrew Lygin ***@***.***> wrote:
 @ConradIrwin <https://github.com/ConradIrwin>, yes, I'm absolutely
 committed to this task. This PR is waiting for the TapSwitcher
 <#7653> to be implemented.
 And the tab switcher is pretty close, it's waiting for a couple
 <#8782> of other
 <#9099> PR's to be merged.
 I started all this TabSwitcher thing just to be able to merge this PR and
 be able to hide the tab bar :)
 Though you can close it if it's a burden to keep it in the queue. I'll
 reopen as soon as all the prerequisites are ready.
 —
 Reply to this email directly, view it on GitHub
 <#7356 (comment)>,
 or unsubscribe
 <https://github.com/notifications/unsubscribe-auth/AAAXAQHHLDJPNYT5WFZUF43YYCEPFAVCNFSM6AAAAABCYZKQD2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSOJVGEYDCMZZGE>
 .
 You are receiving this because you were mentioned.Message ID:
 ***@***.***>
 | 
| 
 Thanks! I've booked a slot. | 
e95d1a5    to
    9d684d7      
    Compare
  
    The Tab Switcher implementation (#7653): - `ctrl-tab` opens the Tab Switcher and moves selection to the previously selcted tab. It also cycles selection forward. - `ctrl-shift-tab` opens the Tab Switcher and moves selection to the last tab in the list. It also cycles selection backward. - Tab is selected and the Tab Switcher is closed on the shortcut modifier key (`ctrl` by default) release. - List items are in reverse activation history order. - The list reacts to the item changes in background (new tab, tab closed, tab title changed etc.) Intentionally not in scope of this PR: - File icons - Close buttons I will come back to these features. I think they need to be implemented in separate PRs, and be synchronized with changes in how tabs are rendered, to reuse the code as it's done in the current implementation. The Tab Switcher looks usable even without them. Known Issues: Tab Switcher doesn't react to mouse click on a list item. It's not a tab switcher specific problem, it looks like ctrl-clicks are not handled the same way in Zed as cmd-clicks. For instance, menu items can be activated with cmd-click, but don't react to ctrl-click. Since the Tab Switcher's default keybinding is `ctrl-tab`, the user can only click an item with `ctrl` pushed down, thus preventing `on_click()` from firing. fixes #7653, #7321 Release Notes: - Added Tab Switcher which is accessible via `ctrl-tab` and `ctrl-shift-tab` (#7653) (#7321) Related issues: - Unblocks #7356, I hope 😄 How it looks and works (it's only `ctrl-tab`'s and `ctrl-shift-tab`'s, no `enter`'s or mouse clicks): https://github.com/zed-industries/zed/assets/2101250/4ad4ec6a-5314-481b-8b35-7ac85e43eb92 --------- Co-authored-by: Conrad Irwin <[email protected]> Co-authored-by: Mikayla Maki <[email protected]>
| @williamdes To be clear, that comment of mine you quoted was regarding hiding tabs completely. Whether an option for tabs at the bottom is provided is not something that matters to me. But for vim and other modal editors tabs are not expected to be displayed at all. @alygin I've been using this PR daily and hiding tabs. It works great mixed with the tab switcher. 
 I see this note. I'm not so sure I'd even hide tabs in the terminal just because I typically have a very limited set that I don't mind seeing. Not that they shouldn't be hideable eventually, but it doesn't look surprising to me. The only thing that took me a bit by surprise was that the tabs display in a project search. That might be a good fast follow if this eventually gets in. | 
| 
 It seems to me that tab-tiling doesn't have a way to deal with the same buffer, but in vim-bufferline tabs are just visualizations of the buffer, and the user doesn't really care what's open, just what they're currently editing, or what they want to change the current display to. For multi-window users who just need to choose the layout, what to display in different windows, and then write or review Hidden tabs paired with a buffer switcher is an alternative to this functionality, though lacking the possibility of mouse manipulation | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Given the discussion here, and our designer's skepticism, I'm revising my review:
This PR is great as is, let's remove the 'bottom' placement for tabs until we have more data, and then we can merge this :)
Thanks for all the hard work on this one @alygin, I know it's been a long road!
| @mikayla-maki, since we're removing the  | 
| 
 @baldwindavid, fixed | 
| 
 Let's do that. Generally, I like to prefer enums to booleans. But also, the phrasing of  | 
| 
 Done | 
| Thanks – that settings change brings it more in line with other similar settings. | 
| Thank you! | 
| Yey! I've been waiting for this! | 
| Closes #11727 | 
| A great option, closer to zen mode, but can you add a command? | 
This PR is another step to tabless editing (zed-industries#6424, zed-industries#4963). It adds support for tab bar settings that allow the user to change its placement or to hide completely. Configuraton: ```json "tab_bar": { "show": true } ``` Placemnet options are "top", "bottom" and "no". This PR intentionally doesn't affect tab bars of other panes (Terminal for instance) to keep code changes small. I guess we'll do the rest in separate PRs. Release Notes: - Added support for configuring the editor tab bar (part of zed-industries#6424, zed-industries#4963). --------- Co-authored-by: Mikayla <[email protected]>
| 
 @d1y, while adding such a command is technically a simple task, I'm not sure if it can be naturally embedded into the existing UX-patterns. The state of toggable-by-action elements is stored in the local DB and it may conflict with what  Do you know other features in Zed that have both the setting in  | 
| Vim has both. The toggle command writes to the settings. | 
| @ConradIrwin, will it be OK if Zed behaves the same way? | 
| @alygin Just in case it's not clear, the actual  | 
This PR adds the `editor: toggle tab bar` action that hides / shows the tab bar and updates the `tab_bar.show` setting in `settings.json` accordingly. First mentioned in #7356 (comment). Release Notes: - Added the `editor: toggle tab bar` action.
This PR is another step to tabless editing (#6424, #4963). It adds support for tab bar settings that allow the user to change its placement or to hide completely.
Configuraton:
Placemnet options are "top", "bottom" and "no".
This PR intentionally doesn't affect tab bars of other panes (Terminal for instance) to keep code changes small. I guess we'll do the rest in separate PRs.
Release Notes: