Skip to content

vim: Make :bdelete use new workspace::CloseItemInAllPanes command #48592

Merged
dinocosta merged 6 commits intozed-industries:mainfrom
baldwindavid:vim-bdelete-all
Feb 10, 2026
Merged

vim: Make :bdelete use new workspace::CloseItemInAllPanes command #48592
dinocosta merged 6 commits intozed-industries:mainfrom
baldwindavid:vim-bdelete-all

Conversation

@baldwindavid
Copy link
Contributor

@baldwindavid baldwindavid commented Feb 6, 2026

Summary

Makes :bd (:bdelete) close a buffer across all panes where it's open, rather than just the current pane.

This was mentioned in the "Future Work" section of the recently merged #47079 as a supporting feature.

This matches Helix's :bc (:bclose) behavior. In vanilla Vim, :bdelete closes all windows displaying the buffer, which many users find disruptive—hence popular plugins and keybinding workarounds that preserve window layout. This implementation aligns with this behavior: the buffer is removed from all panes, but panes remain open (showing another tab, or closing only if empty). This is also a better fit for Zed since buffers are inextricably tied to panes so closing the entire pane may mistakenly close a bunch of buffers.

Also refactors the tab switcher's close button to leverage this command.

Release Notes:

  • Vim: :bd (:bdelete) now closes the file in all panes where it's open
  • Added workspace::CloseItemInAllPanes action to close a file across all panes

@cla-bot cla-bot bot added the cla-signed The user has signed the Contributor License Agreement label Feb 6, 2026
@maxdeviant maxdeviant changed the title vim: :bdelete uses new workspace::CloseItemInAllPanes command vim: Make :bdelete use new workspace::CloseItemInAllPanes command Feb 6, 2026
* main: (57 commits)
  agent: Fix disabled MCP servers disappearing from UI after restart (zed-industries#47758)
  Update Rust crate git2 to v0.20.4 [SECURITY] (zed-industries#48400)
  Update Rust crate time to v0.3.47 [SECURITY] (zed-industries#48514)
  gpui: Reset `external_files_dragged` after successful drag-drop on macOS (zed-industries#48727)
  language: Return early if no grammars are added (zed-industries#48685)
  Properly handle multi-char folds (zed-industries#48721)
  collab: Proxy `GET /extensions` to Cloud (zed-industries#48717)
  git: Fix a potential misalignment in the side-by-side diff (zed-industries#48690)
  Move extension API DTOs into `cloud_api_types` (zed-industries#48689)
  git: Add a setting for the default view mode of `SplittableEditor` (zed-industries#48440)
  Use proper settings name for semantic tokens' settings UI (zed-industries#48686)
  gpui: Fix restarting panicking due to double borrows on windows (zed-industries#48667)
  Strip broken thinking blocks from Anthropic requests (zed-industries#48548)
  keymap_editor: Add `alt-l` keybinding for cycling favorite models (zed-industries#48390)
  Only raise Windows timer resolution while blocking with timeout (zed-industries#48379)
  editor: Propagate `buffer_font_features` to signatureHelp popover (zed-industries#48653)
  Add configurable LSP timeout setting (zed-industries#44745)
  editor: Use buffer_font for folds and change foreground color (zed-industries#48652)
  lsp: Update root_path for compatibility with language servers (zed-industries#48587)
  Fix panic with LSP folds on disappearing excerpts (zed-industries#48649)
  ...
Exercise the multi-pane close path by adding a third pane with an item,
ensuring `close_pinned: true` actually propagates across multiple panes.
Copy link
Member

@dinocosta dinocosta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @baldwindavid ! 🙂

@dinocosta dinocosta enabled auto-merge (squash) February 9, 2026 16:43
@dinocosta dinocosta merged commit 4911855 into zed-industries:main Feb 10, 2026
1 check passed
osiewicz added a commit that referenced this pull request Feb 10, 2026
osiewicz added a commit that referenced this pull request Feb 10, 2026
- **Revert "vim: Make `:bdelete` use new
`workspace::CloseItemInAllPanes` command (#48592)"**
- **Revert "linux: Forward env vars starting with ZED_ to flatpak-spawn
(#48118)"**
- **ci: Fix builds on hel1-windows-1**


- [x] Tests or screenshots needed?
- [x] Code Reviewed
- [x] Manual QA

Release Notes:

- N/A
@osiewicz
Copy link
Member

This PR has been merged accidentally due to automerge and a screw-up from my side. Ideally we should re-land this.

morgankrey added a commit that referenced this pull request Feb 14, 2026
This is an experiment showing what the docs-suggest workflow would have
generated for the v0.224 preview release.

PRs analyzed:
- #48118: Forward ZED_ env vars to flatpak (no docs needed)
- #48467: Move update button to title bar (docs needed)
- #48553: Tool permissions refactor (docs exist, wrong format)
- #48592: vim :bdelete command (docs needed)
- #48814: Devcontainer root support (docs needed)
- #48912: Split diff default (docs needed)

5 of 6 PRs generated actionable suggestions.

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
morgankrey added a commit that referenced this pull request Feb 14, 2026
This is an experiment showing what the docs-suggest workflow would have
generated for the v0.224 preview release.

PRs analyzed:
- #48118: Forward ZED_ env vars to flatpak (no docs needed)
- #48467: Move update button to title bar (docs needed)
- #48553: Tool permissions refactor (docs exist, wrong format)
- #48592: vim :bdelete command (docs needed)
- #48814: Devcontainer root support (docs needed)
- #48912: Split diff default (docs needed)

5 of 6 PRs generated actionable suggestions.

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
morgankrey added a commit that referenced this pull request Feb 14, 2026
This is an experiment showing what the docs-suggest workflow would have
generated for the v0.224 preview release.

PRs analyzed:
- #48118: Forward ZED_ env vars to flatpak (no docs needed)
- #48467: Move update button to title bar (docs needed)
- #48553: Tool permissions refactor (docs exist, wrong format)
- #48592: vim :bdelete command (docs needed)
- #48814: Devcontainer root support (docs needed)
- #48912: Split diff default (docs needed)

5 of 6 PRs generated actionable suggestions.

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
morgankrey added a commit that referenced this pull request Feb 14, 2026
Example output showing what the docs-suggest automation would generate
for the v0.224 preview release.

PRs analyzed:
- #48118: Forward ZED_ env vars to flatpak (no docs needed)
- #48467: Move update button to title bar (docs needed)
- #48553: Tool permissions refactor (docs exist, wrong format)
- #48592: vim :bdelete command (docs needed)
- #48814: Devcontainer root support (docs needed)
- #48912: Split diff default (docs needed)

5 of 6 PRs generated actionable suggestions.

Files:
- docs/.suggestions/v0.224-suggestions.md: Raw suggestion output
- docs/src/update.md: Update notification UI documentation
- docs/src/vim.md: Added :bdelete command
- docs/src/dev-containers.md: Root config file location support

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed The user has signed the Contributor License Agreement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants