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
50.51k stars 3.13k forks source link

/tab should insert all visible panes #20674

Open dlants opened 1 week ago

dlants commented 1 week ago

Check for existing issues

Describe the feature

When I'm working on several files in parallel, I often open them in a vsplit. Using /tab currently in that context is a bit confusing, since it's hard to anticipate which of the vsplit files will be inserted into the assistant context. I think it would be really helpful if /tab inserted all of the visible panes into the context.

/tab all is not really what I expect either, since there may be many tabs in the background, and that's more than I typically intend.

Environment

Zed: v0.161.1 (Zed) OS: macOS 14.6.1 Memory: 16 GiB Architecture: aarch64

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

No response

notpeter commented 1 week ago

Would something like /tab visible (adds the currently selected/visible tab from each pane) satisfy your request?

Similarly maybe /tab pane could be a halfway point between /tab and /tab all and only include all tabs from the most recently focused pane?

dlants commented 1 week ago

These both sound like good ideas. I think there's a need in here too for making it more clear "which pane will be imported?" for the /tab and /tab pane command, if you have multiple panes visible.