zed-industries / zed

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
https://zed.dev
Other
46.54k stars 2.64k forks source link

Move Editor into Group #14232

Open stolinski opened 1 month ago

stolinski commented 1 month ago

Check for existing issues

Describe the feature

VSCode has a handfull of shortcuts for move a tab into another pane without keeping the same file open twice. Right now running split will open the same file in two panes, but it's very handy to move the current file into a new pane without keeping two copies of it open. I've attached a gif showing how VSCode does it with Move Editor Into Next Group as well as a list of their shortcuts. This is something I use 100 times a day.

If applicable, add mockups / screenshots to help present your vision of the feature

Screenshot 2024-07-11 at 11 43 21 AM

Screen Recording 2024-07-11 at 11 39 33 AM

ovidius72 commented 1 month ago

Please consider this is a common use case for vim users. In vim splitting a pane will always crate a copy of the current "buffer" to the right. This is useful when you need to compare portion of the same files, look around for some references while keep working on the same file. If someone plan to adopt this requests, please allow an option to preserve the default behavior.

stolinski commented 1 month ago

@ovidius72 I'm not asking for split to change, I'm asking for the addition of a "move to group"

ovidius72 commented 1 month ago

@stolinski sorry I misunderstood this sentence

Right now running split will open the same file in two panes, but it's very handy to move the current file into a new pane without keeping two copies of it open

Anyway, either ways are fine as long as we keep an option to let the user decide the default behavior.

lfelipessilva commented 1 month ago

This command not just allows to open the files in split panes, but also to move the current file to other panes. I think this is quite handful