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

Allow to split an editor into an existing group #133260

Closed
Conchylicultor opened this issue Sep 16, 2021 · 6 comments
Closed

Allow to split an editor into an existing group #133260

Conchylicultor opened this issue Sep 16, 2021 · 6 comments
Assignees
Labels
feature-request Request for new features or functionality on-release-notes Issue/pull request mentioned in release notes on-testplan workbench-editors Managing of editor widgets in workbench window

Comments

@Conchylicultor
Copy link

When I edit code, I often use the Right click -> Split right to duplicate a file side by side. However I rarely need more than 2 panes open at the same time.

When a pane already exists on the right, it would be nice if Right click -> Split right duplicate the file in the existing pane, rather than creating a new one.
So the first time, Right click -> Split right would create a new pane, then the future Right click -> Split right would reuse the new existing right pane.

In the less frequent case where users need 3 or more panes, it would still be possible to create new panes by using Right click -> Split right on the right-most pane.

I think it would simplify the most frequent use-case where user want to duplicate a file (to view it side by side), but want to reuse the existing opened pane.

This new behavior could be controlled by a new setting option.

Currently, when the editor is split in 2: Everytime we need to duplicate a file, Right click -> Split right create a third collumn (in the middle), and we need to manually drag the file into the right collumn to close the middle collumn.

@bpasero
Copy link
Member

bpasero commented Sep 16, 2021

@bpasero bpasero added the info-needed Issue requires more information from poster label Sep 16, 2021
@Conchylicultor
Copy link
Author

Conchylicultor commented Sep 17, 2021

Thanks for the pointer. However this does not really solve my issue. I want to keep my editor split in 2-groups with each groups having tabs. #132651 only seems useful to have two views of the same file. However in many case, my 2 groups contain different files and I need to control each groups individually (through tabs).

Additionally, if I already have 2 groups open, #132651 would have the same issue as the current Right click -> Split right: 3 files would be displayed at the same times, which I want to avoid. I only want to have 2 splits, but being able to duplicate file from one group into the next one.

@bpasero bpasero changed the title Option in "Split right" to open in existing pane rather than duplicate Allow to split an editor into an existing group Sep 17, 2021
@bpasero bpasero added feature-request Request for new features or functionality workbench-editors Managing of editor widgets in workbench window and removed info-needed Issue requires more information from poster labels Sep 17, 2021
@bpasero bpasero added this to the September 2021 milestone Sep 17, 2021
@bpasero
Copy link
Member

bpasero commented Sep 17, 2021

Understood. I added the following 8 commands to split editors into other groups, reusing groups if present:

image

  • workbench.action.splitEditorToPreviousGroup
  • workbench.action.splitEditorToNextGroup
  • workbench.action.splitEditorToAboveGroup
  • workbench.action.splitEditorToBelowGroup
  • workbench.action.splitEditorToLeftGroup
  • workbench.action.splitEditorToRightGroup
  • workbench.action.splitEditorToFirstGroup
  • workbench.action.splitEditorToLastGroup

@Conchylicultor
Copy link
Author

Awesome! Thank you for the fast implementation.
Is there a way to use those from the contextmenu (right click > split left) ? Or will this require creating an extention ?

@bpasero
Copy link
Member

bpasero commented Sep 21, 2021

Currently no plans to add this to the context menu to keep it small.

@Conchylicultor
Copy link
Author

I agree about keeping the menu minimal.

My original proposal was not to add any new context options, but to allow control the behavior of the current right click > split left option between:

  • Always create a new group (current)
  • Reuse group if exists

@bpasero bpasero added on-testplan on-release-notes Issue/pull request mentioned in release notes labels Sep 24, 2021
@github-actions github-actions bot locked and limited conversation to collaborators Nov 1, 2021
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 on-release-notes Issue/pull request mentioned in release notes on-testplan workbench-editors Managing of editor widgets in workbench window
Projects
None yet
Development

No branches or pull requests

2 participants