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

Aux window: Allow to control drag and drop operations out of the window for e.g. opening new windows #8171

Closed
bpasero opened this issue Jun 27, 2016 · 19 comments
Assignees
Labels
electron Issues and items related to Electron feature-request Request for new features or functionality keep Issues we should not close as out of scope on-testplan workbench-auxwindow Issues related to use of auxiliary ("floating") windows. workbench-dnd Drag-and-drop issues
Milestone

Comments

@bpasero
Copy link
Member

bpasero commented Jun 27, 2016

This issue is for the user gesture of dragging a file or tab out of the window to have it open as separate window. This likely requires some changes in Electron to get working, since the target of the drag and drop operation is outside of the window.

For the request to open an editor in multiple windows easily, see #10121

@bpasero bpasero added feature-request Request for new features or functionality workbench file-explorer Explorer widget issues labels Jun 27, 2016
@bpasero bpasero added this to the Backlog milestone Jun 27, 2016
@bpasero bpasero self-assigned this Jun 27, 2016
@iam3yal
Copy link

iam3yal commented Jun 27, 2016

@bpasero DND can be pretty great but how about starting from something more primitive? like right click on a tab and create a new window? right click on a folder in the explorer and create a new window? I imagine you can pass all the information you need through IPC (Inter-Process Communication) but first you need to have this infrastructure.

@bpasero
Copy link
Member Author

bpasero commented Jun 27, 2016

Yes, all related scenarios.

@iam3yal
Copy link

iam3yal commented Jun 27, 2016

Okay, thanks. :)

@bpasero bpasero added the workbench-tabs VS Code editor tab issues label Jul 12, 2016
@bpasero bpasero removed their assignment Aug 17, 2016
@bpasero bpasero added the help wanted Issues identified as good community contribution opportunities label Oct 4, 2016
@bpasero bpasero mentioned this issue Feb 3, 2017
@lostpebble
Copy link

lostpebble commented Jun 5, 2017

As far as IDE's go, this is a very important feature for me.

"Split Editor" doesn't cut it because one screen is two small and stretching the entire VS Code app across multiple screens is rather messy (code getting cut in the gutter of screens etc.)

I've been using the new instance method (Ctrl + Shift + N) and dragging windows into that - except it seems my settings and project context gets lost which makes it not a real a solution at the moment.

I understand there may be window management limitations with Electron holding this back (I remember Atom having this problem too), but I feel it at least warrants a comment and hope that there is a still a push to resolve this.

@WhatIfWeDigDeeper
Copy link

WhatIfWeDigDeeper commented Mar 3, 2019

The work-around I discovered was to open a sub-directory first, like src, and then open the main directory, so you get two instances of VS Code so as to have the same project open in multiple windows. This also works for single files like > code readme.md. It's important to open the file or subdirectory first, otherwise Code is smart enough to detect that it is under the same project that is already open so it will not open another instance.

If you did implement this feature, I agree with @eyalsk that having an option on the right click menu of the tab to open in a new instance would be a lot more doable than detecting drag & drop outside the electron app.

@siriuscc
Copy link

I have the same problem, and now dragging tab causes files to be copied, which is not what I want at all.

@tiagosiebler
Copy link

tiagosiebler commented Apr 20, 2020

Shameless bump - any plans on getting this added. I'd even be happy with a "right-click -> open tab in new window" item. For anyone looking to make this easier in the meantime, found an extension from @takkaO that adds this right-click option - works well enough: https://github.com/takkaO/VSCode-OpenWindowTabContext

@yihuang995
Copy link

As a work-around, see this stackoverflow answer. I'm on a Mac and it works for me. I haven't tested Windows.

"On Windows and Linux, press Ctrl+K, then release the keys and press O (the letter O, not Zero).

On macOS, press command+K, then O (without holding command).

This will open the active file tab in a new window/instance."

Thanks, it is an alternative way but not best.

For example, when I use the official Extension Remote - SSH, these operations will create a new SSH connection, which produce new processing and need litlle time for connecting. And the development environment is initialized to default setting but not us currently used.

@oliverdrummond

This comment was marked as spam.

@Kurohyou
Copy link

Would love to see this! Especially since the behavior of copying a file to the desktop when you drag a tab out is not behavior I have seen in any other application which makes it extremely unintuitive.

@ubieda

This comment was marked as spam.

@oliverdrummond

This comment was marked as spam.

@bpasero bpasero added the electron Issues and items related to Electron label Aug 3, 2022
@bpasero bpasero changed the title Allow to drag a file out of the window to open a new window Allow to control drag and drop of items out of the window for e.g. opening new windows Aug 3, 2022
@bpasero bpasero changed the title Allow to control drag and drop of items out of the window for e.g. opening new windows Allow to control drag and drop operations out of the window for e.g. opening new windows Aug 3, 2022
@bpasero bpasero added the keep Issues we should not close as out of scope label Dec 8, 2022
@Chan0081
Copy link

2023
still expecting this!

please!

@bpasero bpasero added the workbench-auxwindow Issues related to use of auxiliary ("floating") windows. label Oct 18, 2023
@bpasero bpasero self-assigned this Nov 3, 2023
@bpasero bpasero changed the title Allow to control drag and drop operations out of the window for e.g. opening new windows Aux window: Allow to control drag and drop operations out of the window for e.g. opening new windows Nov 10, 2023
@bpasero
Copy link
Member Author

bpasero commented Nov 11, 2023

A first version of this is pushed to insiders that allows to drag an editor tab or tab group out of the window to open into a floating window (leveraging the new floating window support).

Please try it out and let me know how it goes. You can still drag and drop tabs between VS Code windows to move them, but dropping a tab anywhere else will cause a new window. This is behind a new setting workbench.editor.dragToOpenWindow

Recording 2023-11-11 at 07 21 17

You can give our preview releases a try from: https://code.visualstudio.com/insiders/

@Seraphli
Copy link

I have a question. When a tab is dragged to create a new window, is it using the same session as the previous window? I'm wondering if when I'm debugging a program, the breakpoint information can be shared between windows. The current "duplicate current workspace" doesn't seem to achieve this.

@bpasero
Copy link
Member Author

bpasero commented Nov 13, 2023

@Seraphli yeah it should, give it a try in insiders!

@bpasero
Copy link
Member Author

bpasero commented Nov 13, 2023

@github-actions github-actions bot locked and limited conversation to collaborators Dec 28, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
electron Issues and items related to Electron feature-request Request for new features or functionality keep Issues we should not close as out of scope on-testplan workbench-auxwindow Issues related to use of auxiliary ("floating") windows. workbench-dnd Drag-and-drop issues
Projects
None yet
Development

No branches or pull requests