-
Notifications
You must be signed in to change notification settings - Fork 29.3k
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
Allow to open two distinct editors side by side in one group #36700
Comments
I found the discussion about enhancing the editor group functionality here ...and added some thoughts of my own about how grouping and splitting should be two separate things which it might be useful to reiterate here.
|
+1 Sent from my Samsung SM-A500H using FastHub |
+1 This is the only reason why I'm unable to switch from vim to vscode. The idea is that you want to be able to split a tab, not the entire editor. |
This workflow would make sense to me as well. I work in Vim the same way that robertocarla describes. I like to work with implementation and tests side by side, and switch tabs to switch to a different implementation/test pair. It's also disruptive opening a git diff when you have got a split view open, as the diff opens in one side of the split only, but splits it in half again. Ideally, opening a git diff would open a new tab (a blank canvas with no splits), splitting that in two vertically. |
I fully agree the description in this ticket. The current "split" functionality imposes a reduction of edition area to all other editors. This is not an editor split but a layout split. |
Vim-style splitting would be awesome! This is the cause of one of the few remaining efficiency decreases I get by switching to VSCode from Vim |
+1 for this, also a feature I'd like to see. I think there's quite a few users trying to migrate off vim that use this workflow! |
Trying to migrate from Webstorm, and this sucks. |
In SQL Server Management Studio and Textpad, I often like to split a single tab into two views, one on top of the other, so I can see two sections of a file in the same tab. It's very convenient for keeping the important parts of the code right in front of my eyes. And just to be clear, when I click to a different tab, the whole of the previous tab (with both views) hides behind the new tab. I don't want to have two tabs for the same file, where the second tab is still visible even after I click to a different tab. (Hope that makes sense.) Would definitely appreciate this. |
Any news here? |
@bpasero What is the status of this feature request? Has it been added to any roadmaps or backlogs? I think the duplicates and thumbs up indicate a pretty healthy demand. |
@Hubro it is on the Backlog: As for indicating "healthy" demand, this issue is currently at position ~250 in terms of upvotes based on this list: https://github.com/microsoft/vscode/issues?q=is%3Aissue+is%3Aopen+sort%3Areactions-%2B1-desc So I would argue, 250 issues have more demand compared to this one (if you count upvotes as a sign for demand). As such, it may stay on the Backlog for a longer period or even forever. |
Perhaps it would help to have some color on whether this is a limitation of electron, or if there are other architectural challenges to making this happen. For instance, I noticed in the discussion on custom editors / webviews there was mention of
Is that a possible solution, or am I completely barking up the wrong tree? Would be nice to get a feel for how this might relate to other items on the UI roadmap (e.g. detachable terminals and editors), or maybe some pointers for community solutions (extensions or PR attempts). Thanks. |
Reading through the comments and linked issues, it looks like the original intent of just splitting 1 editor into 2 is not what got all the upvotes. Instead, it seems that some are asking for being able to open 2 different editors in the same group (also in #22068) and others want to open as many editors as they want side by side in a group ("VIM Style Tabs"). I feel that being able to open any 2 editors side by side in a group is realistic. Being able to have a full grid of editors within a group is imho rather unrealistic for the complexity this brings and given we have full grid support via groups already. As such I have extracted #132651 for the work I am planning to do in September or what is already pushed with regards to being able to split an editor into 2. |
open setting config with split view, then use ctrl+kctrl+shift+\and the split view is closed into one, but trigger that again, we couldn't recover the split setting view, |
@heartacker if you see any issues specific to settings, please report as new issues and make sure to try this out in insiders. You can give our preview releases a try from: https://code.visualstudio.com/insiders/ |
I hope this feature can also be used when we move the terminal to the editor area. |
@bpasero Hi. Is the split an editor without creating a new group feature available for plugins? Can a plugin use this feature for creating own UI inside a splited tab? |
There is no official API, though arguably an extension could open an editor and then trigger the |
I'm a little confused, is this being dropped? The issue title changed to something different, and I can't find the original ask tracked somewhere else. But just to recap, because this issue is getting huge and confusing to me: For most vim users, this is an intrinsic part of the workflow for stuff like having an impl/test side-by-side, and maybe you open a third split for like, an HTML template or stylesheet. Then, those 3 splits are grouped together in one tab. So when I want to think about "ComponentX", I just navigate to that tab and see everything at once. Maybe even a 4th split for documentation. I think multiple editors solves all of this, but the missing piece is grouping them into a single tab. One way to solve this might be to introduce an optional, higher-order tab bar where each tab groups editor splits, and then provide an option to disable the tab bar inside the editors. But anyway, I understand that's probably a lot of effort. I hope the original feature request is still tracked somewhere, though. |
I think this is something that would be really useful, especially if it could be controlled via an extension. For example, we often use two editor groups for doing side-by-side previews (eg markdown). But that is usually no what is wanted as when you click onto another editor tab, the preview is still taking up half the screen. It would be great if extensions could split an editor in half, and then put a webview into the other half. |
It definitely feels like the Code team prefers this functionality be implemented as an extension, and this is pretty much exactly what my extension "Workviews" (https://marketplace.visualstudio.com/items?itemName=agquick.workviews) does, except the "tabs" are shown in the Explorer pane on the left. The problem is I can't get access to all the open editors/terminals/etc properly until VS Code decides to open up the extension APIs a bit. But it's the closest feeling to VIM I've been able to achieve thus far. |
I think that is slightly different to what is being asked for here. (The post above is a demo of what could be done with the functionality, not what we are asking for explicitly.) This FR is asking for a way for extensions to control the "Split Editor in Group" functionality and specify what is rendered in the other half of the editor. At the moment it is not possible for extensions to do that. |
If you gather context from reading the thread, it's likely that most of the support for this FR is from Vim users who have a workflow based on grouping multiple editors within tabs. They've been punted here from other FR's that are closed as duplicates of this FR. In my opinion, the main issue is that tabs don't group anything. One-to-one correlation between tabs and files, except in some special cases, like the diff view. Creating another grid inside the existing editor grid seems like the wrong way to solve the problem to me-- especially if the new grid is subject to limitations like only horizontal splitting + showing the same file. See #143024 for an alternate solution that solves everyone's problem. |
Related on Stack Overflow: Is it possible to create split editors inside individual tabs in VS Code?. I'll keep my answer post updated with whatever progress is made here. |
VsCode has the ability to horizonatally split an editor window. When you execute
code --diff file1 file2
both files are opened side by side in a single editor window with a single header tab. A similar view is presented when you edit the VsCode settings.This is splitting. It would be nice to be able to do this for my own files to have multiple views of the same file. What would make it actually usable would be the following three enhancements.
What we currently have is a keyboard shortcut "workbench.action.splitEditor" which doesn't actually split an editor at all, instead it just opens the same file in another editor in a different editor group. This is not editor splitting which by definition should occur in the same editor tab.
Calling opening a file in another editor group 'splitting' when there is already nascent functionality to support proper splitting is a pointless ambiguity that serves only to reduce the possibility that the editor will ever support proper splitting any time in the near future.
Proposal:
The text was updated successfully, but these errors were encountered: