Skip to content
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

Drag to split horizontally #142840

Closed
martin-braun opened this issue Feb 11, 2022 · 10 comments
Closed

Drag to split horizontally #142840

martin-braun opened this issue Feb 11, 2022 · 10 comments
Labels
feature-request Request for new features or functionality workbench-editors Managing of editor widgets in workbench window

Comments

@martin-braun
Copy link

martin-braun commented Feb 11, 2022

The big brother Visual Studio has a very interesting small feature that had a huge impact on my QoL experience when building a WPF app recently, it's the ability to drag the top end to split the editor horizontally:

2022-02-11 2 06 17 PM

It's not just a smooth experience due to the drag mechanic, but it's also incredibly useful, because unless on regular splitting, you don't lose focus on the line of interest, since the splitting is smooth. It really made temporary working on two places in the same file more convenient, because as fast as it's split as fast it un-splits again.

The closest I came up with in VSCode was to first split the layout and then toggle the layout and I would end up with horizontally centered split. It feels a little bit clunky.

@heartacker
Copy link
Contributor

I really want this, as mentioned in #36700 (comment)

@gjsjohnmurray
Copy link
Contributor

The closest I came up with in VSCode was to first split the layout and then toggle the layout

Once you have set "workbench.editor.splitInGroupLayout": "vertical" all subsequent uses of View: Split Editor in Group should give you the effect you want. Not as slick as what you show from VS, but it's a start.

pinging @bpasero

@martin-braun
Copy link
Author

martin-braun commented Feb 11, 2022

@gjsjohnmurray thanks, that's some useful information, but there are also cases where I want the quick vertical split, i.e. when comparing line by line in fullscreen mode when horizontal space is no issue. It really depends on the task and the screen real estate / window size.

Also in VS I had quite some situations where I would have two files opened side by side (vertically split) and would drag down the horizontal split on one file to edit two places in one file while still looking for reference on the other opened file.

I hope this feature will be implemented in the future, because it would make VS Code so much more flexible and great to work with. Really fell in love with this particular feature in VS. :)

@meganrogge meganrogge assigned bpasero and unassigned meganrogge Feb 11, 2022
@bpasero bpasero added feature-request Request for new features or functionality workbench-editors Managing of editor widgets in workbench window labels Feb 12, 2022
@bpasero bpasero removed their assignment Feb 12, 2022
@bpasero
Copy link
Member

bpasero commented Feb 12, 2022

The functionality is there, but you cannot start the split by dragging, you need to use a command.

@martin-braun
Copy link
Author

@bpasero You are right, I found the command "View: Split Editor Down", so I can shortcut it at least, still would appreciate the drag mechanic for the smoothness.

@gjsjohnmurray
Copy link
Contributor

@martin-braun be sure to understand the difference between View: Split Editor Down and View: Split Editor in Group. The latter is a lighter-weight UI, and doesn't produce a new editor group.

If you prefer having the extra group, notice that the related button can be alt-modified to work downwards instead of rightwards:

image

@martin-braun
Copy link
Author

Uff 10 days, but only 4 likes. I guess no smoothness for Visual Studio Code then. 🙄

@github-actions github-actions bot locked and limited conversation to collaborators May 29, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature-request Request for new features or functionality workbench-editors Managing of editor widgets in workbench window
Projects
None yet
Development

No branches or pull requests

6 participants
@bpasero @heartacker @gjsjohnmurray @martin-braun @meganrogge and others