Tabs & tab management #6667
Replies: 25 comments 28 replies
-
Tabs are a weird thing. They are essential, but I've never found any one system that is great. That being said, I have no idea what would make them any better. Some inspiration - Jetbrains' IDEs have a bunch of ways to tweak tab behavior The items under "Closing Policy" are basically a more advancec Jetbrain's also allows of the tab bar to be placed vertically, which lets you view a lot more at once, since the amount that fits on the screen isn't determined by the amount of text, but the static height of the tab button itself. Not everyone's cup of tea, just a different way to handle things. |
Beta Was this translation helpful? Give feedback.
-
Propably controversial, but I personally like tabs to be reserved for projects (or repositories) and don't use them for files. I have this e.g. in VSCode and Sublime on macOS, where the native macOS tabs are used for projects/repos opened, and the VSCode/Sublime built-in tabs for files (doesn't work that way on Windows though). If tabs are project/repository only, I never end up with too many open tabs in parallel. So tab management isn't an issue in this case. For files, I consider the following good alternatives for tabs: I still use tabs in Sublime and VSCode, mostly because (c) is lacking in both. I usually just close everything and start fresh when I start work on a new feature/bug - so not really a good workflow. I've disabled ephemeral tabs as I never was able to get used to them and always found it confusing when the file was gone after navigation away. |
Beta Was this translation helpful? Give feedback.
-
I do like the vertical list of active files too. What editor are you showing here? |
Beta Was this translation helpful? Give feedback.
-
Man! Tabs, from a UX/UI standpoint, are tricky! If you think about it, for dominant keyboard usage (see "code editors"), they don't add much value IMO, other than telling you "these are some of the files you've opened recently". At least in my personal usage, I'd navigate through code/files by other means anyway (e.e., "go to definition", There is a case however that makes tabs somewhat useful IMO, however: Visual hints that show whether a file contains changes that need to be saved. Perhaps vertical space taken by tabs might be better used by integrating more such hints. On the other hand, for dominantly mouse users, I guess tabs may sense as a means to faster access to… recently opened files. 😉 Addressing some of @iamnbutler 's specific questions below:
Often times I feel the urge to close all open tabs with:
Absolutely! I mean in my ideal world that feature shouldn't even exist as it wouldn't be needed in the first place, but as I tried to hint at it above somewhat, I hardly ever reach out to (or interact with) my [open] tabs via a mouse, so they're 99% worthless to me (except for the visual hints they may provide). If any files that I "peek into" were to open in a new tab, I'd go crazy, I think. So to recap, I guess my 2c about tabs is this: Does Zed want to provide a file-centric editor UX or is it more about the entire codebase regardless of how it's split across the filesystem. If you think about it, the editable multi-file buffer view which lets you see errors, search results, etc. does, in my mind, crosses a peculiar line where it isn't as important as where a given piece of code is saved. From that perspective, I think in the long term Zed could take some more bold decisions around what to do about tabs, more than "merely" showing recently opened files. I saw an "HTML/CSS editor" (I guess it would be only fair to make a similar discussion also for the tree viewer, but I will leave that for another day 😄 ) ✌️ |
Beta Was this translation helpful? Give feedback.
-
tabs for me are definitely a nuisance I'd much rather have those few px of vertical space used for code than for a tab bar that I'll never use 😅
not really, I never worry about how many buffers I have opened personally I love the cmd+p+p shortcut of vscode where I can jump back and forth between two files
nope, it's one of the most annoying features I've ever experienced 😅
yes, please 😅 |
Beta Was this translation helpful? Give feedback.
-
(moved from Discord) Haven't used Zed even once yet, but dropping my thoughts after reading through the stuff in there:
|
Beta Was this translation helpful? Give feedback.
-
It seems to me that VSCode does it quite well, but not perfectly.
In my opinion, the cards should "sway" to the width of the file name by default. As a programmer, I want to see where I have an open file, the names can not be hidden from me. For the same reason, I think that when there is no place in the card bar, the cards should be displayed in several rows.
Squeezing cards is ok, but as I wrote above - file names should not hide.
I try to close cards that I haven't used in a long time on an ongoing basis.
Previewing the file after a single click is very helpful. |
Beta Was this translation helpful? Give feedback.
-
I don't necessarily need/want this; however, how about closing open tabs after a certain amount of time if they weren't modified/opened? |
Beta Was this translation helpful? Give feedback.
-
Tabs take up a lot of visual space and are distracting to me. I turn off tabs on all my editors. (exception being Xcode and Visual Studio since I don't think I can turn them off there). I don't think tabs have ever helped me much. I realized this when I spent a lot of time with Emacs (with the projectile and helm plugins). Being able to bring up a list of "open buffers" just as easily as bringing up a list of all project files, is fundamentally the thing I need instead of tabs. What's worse for me as well are how Xcode and Visual Studio have "preview tabs". If I'm debugging or trying to understand a very large project, I'll be hopping all over the place. But they'll happily just close files I've visited which completely interrupts the flow of what I'm doing. At $dayjob I'm working in a 6M line C++ codebase. I need fluent movement through the code more than I need tabs. Bookmarks, open buffer list, etc. |
Beta Was this translation helpful? Give feedback.
-
I will say one thing that I've often found myself wanting to do is group a set of buffers/tabs together so I can easily switch focus between related sets in my visible panes. I will often find that I want to look at a template and the controller/handler code for it along with a model or similar as a set, and in some cases switch between two different representations/clusters of those things to compare or just look at histories as a set too. |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
I think vim's design is pretty good, tabs windows buffers |
Beta Was this translation helpful? Give feedback.
-
The only option I truly desire with tabs is to be able to hide them. Vertical space is at a premium, I navigate with the fuzzy finder, and I gather most of my context via splits, so tabs just add noise. They should probably do more than being able to be hidden, but I would be ill-placed to talk about it. 😞 |
Beta Was this translation helpful? Give feedback.
-
Hi, I'm a experienced WebStorm user. I'm looking for an alternative as my main code editor and I'm trying Zed right now. My best idea last year for tabs was hiding tabs at all. Most of the time I need: search (shift-shift), "Go to defenition"/"Find usages", recent files/places. And I don't mess with tabs any more. Even project files (list of all files) is hidden most of the time. |
Beta Was this translation helpful? Give feedback.
-
Answering both, I know Vivaldi has a lot tab customization options. Though I'm not sure how it could/should be used for file navigation, I like the idea of grouping tabs together for large amounts of tabs. Also, having them in a sidebar (maybe above the project panel like in VSCode #5240), and the option for using breadcrumbs instead (like iamnbutler said).
Usually, I only keep the ones I am currently working in or hopping back-and-forth from open, closing them with the mouse (the close button could be a little bigger though). Sometimes I might leave one or two open for reference though, so I don't have to use the project panel and make ephemeral tabs. Lastly, |
Beta Was this translation helpful? Give feedback.
-
I like vim way with list of active buffers. And I like more the evolution of this idea in Neovim's plugin Telescope with its ability to show search through a list of buffers (built-in vim picker for buffer list) and preview their contents. So I do not need any tabs and just work with opened files. This way gives the ability to show additional information about a buffer, such as a git status and previous buffer, and I've created a keyboard shortcut for it ― hit space twice ― really convenient. It's matter to say that Telescope gives huge ability for customization and integration with different subsystems, e.g. file system manipulations, git, grep, a search for editor settings, linter issues, file-bookmarks and so on. But I see that such behavior is not intuitive for beginners, and maybe it's good idea to place such buffer list not in popup but sidebar so it can be used without keyboard shortcut. Moreover, I use my web-browser sidebar for tab tree (Sidebery extension) as it is more convenient to see a hierarchy and increase amount of displayed tabs. I hope these ideas will lead you to the most orthogonal solution to the tab navigation problem. ☕ |
Beta Was this translation helpful? Give feedback.
-
Please make it possible to disable tabs completely. I use inteliJs products - phpstrom, and I completely get by with search, split view and last opened files. The whole use of tabs makes me want to work with the mouse, which I try to avoid :-) |
Beta Was this translation helpful? Give feedback.
-
I sometimes work with multiple tabs open and I love the ability to switch to the last used tab (how VSCode does it). |
Beta Was this translation helpful? Give feedback.
-
Coming from Sublime, I love being able to trigger split view with modifier keys. Just like in a list of files, you can open consecutive tabs with shift-click and select specific tabs with cmd-click. Works super well with the list of active files in the side bar, as well. |
Beta Was this translation helpful? Give feedback.
-
I would love to see the ability to turn off tabs completely. |
Beta Was this translation helpful? Give feedback.
-
Cycle though last used tabs, instead of just visual order, - is really important to me. |
Beta Was this translation helpful? Give feedback.
-
I would like to see an option to move tabs.
|
Beta Was this translation helpful? Give feedback.
-
Regarding the vertical tabs, I'm just playing around with the source code to get more familiar with it. So far, it's not resizable, and it's just top or right (and none, to remove one config?). PS: the code is not even close to ready to be a PR. |
Beta Was this translation helpful? Give feedback.
-
My 2c, and how I do it in Nvim:
|
Beta Was this translation helpful? Give feedback.
-
Just to add to this, we could have an option to hide tabs for those that don't use it, and add a picker(fzf/telescope style) similar to cmd+shift+p(command palette) where we can see all the buffers/tabs open. This would mimic nicely for those who are used to nvim ways and don't use bufferline. |
Beta Was this translation helpful? Give feedback.
-
I'd love to start a discussion on tab management.
cmd+p
?Edit: Thanks for all the discussion y'all. I post these to let feedback accumulate so we can review them when we update these things. If they ever feel like nothing is happening based on all the feedback, it is likely we just haven't sequenced an update of that part of the editor. Reading through this one now 🙂
Beta Was this translation helpful? Give feedback.
All reactions