Settings to use Zed panes like Vim windows #30908
adityasz
started this conversation in
Ideas From Vim
Replies: 2 comments
-
|
@ConradIrwin |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
I have been patching Zed's preview releases to have Vim-like windows for a few weeks now. (Didn't add settings for them, since I am the only user.) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
It should be possible to ~match Vim's window/buffer model without a fundamental redesign by providing
an actiona command to close a pane (e.g.,pane::Closepane: close, which can be aliased to:quit) along with the following settings:tab_switcher, move the last used tab of the file from its current pane to the active pane. Additionally, close other tabs for this file to prevent multiple unused tabs of the same file from accumulating, see 2.(c) below.file_finder,(a) if the file is not open in any tab, open the file in a tab in the active pane.
(b) if the file is not open in any active tab, perform the same action as
tab_switcher.(c) if the file is open in an active tab (in an inactive pane), open a new tab for the file in the active pane. This allows having the same file in multiple panes visible at the same time so that
:vsplit,:split, etc. can work.{ "tab_switcher": { /** * Move the tab from its current pane to the active pane. * * Supported options: * - "unpinned": Only move unpinned tabs. * - "always": Move all tabs. * - "never": Zed's existing behavior. */ "move_tabs": "always", /** * Close duplicate tabs for this file. * * Supported options: * - "inactive": Close all inactive tabs. * - "unpinned": Only close unpinned tabs. * - "never": Zed's existing behavior. */ "close_duplicate_tabs": "inactive" }, "file_finder": { /** * Determines when to reopen a file instead of switching to an existing tab * using `tab_switcher`. * * Supported options: * - "when_active_tab": Reopens the selected file only when an existing tab * is active in an inactive pane. * - "always": Zed's existing behavior. (Does not reopen the file * having the active tab in the active pane.) */ "reopen_file": "when_active_tab" }, "panes": { /** * Defines what happens to the tabs of a pane when it is closed. * * Supported options: * - "close_tabs": Close all tabs within the pane. * - "move_tabs" Move all tabs from the closing pane to the pane * that becomes active next. * - "move_pinned_tabs": Move only pinned tabs from the closing pane to the * next active pane. All other tabs are closed. */ "on_close": "move_tabs" } }tab_switcher::move_tabsis related to this.Vim also has tabs. They are like having multiple Zed windows for the same project (not possible yet) with
tab_switcherandfile_finderconfigured to move Zed tabs across Zed windows in addition to panes as described above, and closing a Zed window should move all tabs in all panes in the window to the next active pane in the most recently used window. ("Native tabs" would offer a similar UI to Vim tabs but it may not be a planned feature.)Update: Zed already has a
pane: join into nextcommand. The proposedpane: closecommand differs by not changing the active tab of the next pane.Beta Was this translation helpful? Give feedback.
All reactions