Description
From @aguynamedben in #41289:
I wish to live in a "don't-care-about-tabs" world but still want a way to split my editor's UI. However, the idea of tabs and tab groups seems deeply embedded into VS Code's ability to split windows, so I'm skeptical this is coming any time soon.
The best way out of this I can think of is some kind of settings such as:
"workbench.editor.moveToCurrentTabGroupIfOpen": true,
This would be similar to workbench.editor.revealIfOpen but opening a file that's already open in another tab group would move that file into the current tab group. Then I could disable all tab-centric UIs in VS Code and indiscriminately open any file within any split and not end up with a mess of duplicate files open across many tab groups. I think this might be sufficient for most tab-haters.
Working without Tabs could say:
If you're used to text-focused editors such as Emacs or vi and simply want to view any open file within any split without regard for tab or tab groups, set:
"workbench.editor.showTabs": true,
"workbench.editor.revealIfOpen": true,
"workbench.editor.moveToCurrentTabGroupIfOpen": trueWith this setup, the underlying tabs and tab groups system will continue power which files are shown in which visual split, but that will be mostly irrelevant in day-to-day use. You wont see tabs, and opening a file will "move" the open file into whatever tab group ("visual split") you're focused on, similar to Emacs buffers and "windows".
#41289 was originally closed as it was out of scope. However, this suggested feature does not seem out of scope and seems easier to implement than just removing editor groups altogether. I would be happy to try to implement this.
Activity
jonathanjameswatson commentedon Feb 11, 2024
It seems like this might have already been somewhat implemented by @mkcode in #134525 over 2 years ago. Is there any reason why this hasn't been merged and is there anything I can do to help get it merged?
mkcode commentedon Feb 11, 2024
I'll chime in again just to share my experience and perspective with all this:
I completely understand microsoft's values in making vscode as accessible as possible. And, vscode is so close to be able to make people that prefer keyboard oriented approaches (usually coming from vim or eMacs) happy as well. It's just one or two "opt-in" settings away, meaning there would be no changes to the out of the box user experience.
Ultimately, I was unable to create a consistent keyboard oriented workflow in vscode, and have therefore been using neovim. A lost user that could have been supported, by allowing an opt-in setting change to unlock keyboard oriented workflows.
aguynamedben commentedon Feb 17, 2024
+1
@jonathanjameswatson interesting that it doesn't seem that difficult to implement. #134525 is pretty close, I'd just want it to move the tab into current tab group from quick open (not open again).
Hmmm, I've never hacked on VS Code, but given that the other PR is 20 lines and I think there could be a compelling 2 minute video "how to setup VS Code like Neovim or Emacs" it could be pretty compelling and I don't see why it wouldn't be merged.
jonathanjameswatson commentedon Feb 17, 2024
I think it makes sense to move the editor to the current tab group rather than re-open it – with re-opening, if you only use quick open, then you could presumably end up with all editors being in all tab groups.
I believe complexity may come from the interaction between
revealIfOpen
andmoveToCurrentTabGroupIfOpen
. It would not be an unreasonable to assume thatmoveToCurrentTabGroupIfOpen
would not requirerevealIfOpen
to be set, but if this was the case then it would not be clear what would happen if both were set. Perhaps we could use a name likemoveToCurrentTabGroupOnOpenReveal
instead? Although, perhaps that is too verbose.workbench.editor.moveToActiveGroupIfOpen
#205442jonathanjameswatson commentedon Feb 17, 2024
I have made a PR that implements this feature: #205442
Demo here:
2024-02-17.15-56-14.mp4
aguynamedben commentedon Feb 17, 2024
@jonathanjameswatson Amazing!!! It works just like I imagined.
This will really help users coming from Emacs or vi. Users of those editors are accustomed to splitting windows into "frames" or "panes", then being able to recall any buffer into any frame without the file being opened a 2nd time. Your PR and
revealIfOpenInActiveGroup
makes that possible in VS Code. Without this, users must open a file once-per-Editor Group which creates a mess and kills the "fast switching". This is especially confusing for users who want to do side-by-side editing with tabs turned off.I wrote these docs that I think should go under the "Working without Tabs" section, but I don't see how to edit the docs in the vscode repo.
Docs: #205442 (review)
workbench.editor.alwaysOpenInActiveGroupFromQuickOpen
setting #134525aguynamedben commentedon Feb 17, 2024
@mkcode Can you review the PR and docs in my approval as well? Thank you!
3 remaining items
Simulating Buffers in "Working without Tabs" section
aguynamedben commentedon Feb 18, 2024
Docs PR: microsoft/vscode-docs#7043
sutram commentedon Feb 19, 2024
This would be great!
vscodenpa commentedon Feb 20, 2024
🙂 This feature request received a sufficient number of community upvotes and we moved it to our backlog. To learn more about how we handle feature requests, please see our documentation.
Happy Coding!
aguynamedben commentedon Mar 5, 2024
@bpasero @benibenj This feature has been implemented (PR) and documented (PR).
Who can me and @jonathanjameswatson work with to get the PR merged? This is my first time contributing to VS Code and it's been a good experience so far!
aguynamedben commentedon Sep 9, 2024
@benibenj Is there any way to bump this?
The feature is implemented, works great, is documented, is under an option, and has the votes required.
It seems like it's just stuck in VS Codes "backlog" process. This feature will help users switch from vim/neovim/Emacs and other buffer-based editors to VS Code.
benibenj commentedon Sep 10, 2024
Pinging @loganrosen as the change is part of the Editor Resolver Service
loganrosen commentedon Sep 10, 2024
I think you meant @lramos15 🙂
benibenj commentedon Sep 11, 2024
Exactly, I meant @lramos15, sorry 😅
aguynamedben commentedon Nov 12, 2024
Bump!
ihdavids commentedon Nov 23, 2024
bump