Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. Neovim
  3. bufdelete.nvim

bufdelete.nvim

GPL-3.0Lua

Delete Neovim buffers without messing up your window layout, providing a better alternative to :bdelete.

GitHubGitHub
514 stars23 forks0 contributors

What is bufdelete.nvim?

bufdelete.nvim is a Neovim plugin that provides enhanced buffer deletion commands. It replaces Neovim's default `:bdelete` and `:bwipeout` with versions that delete buffers without closing windows or disrupting your layout, solving a common pain point in buffer management.

Target Audience

Neovim users who frequently work with multiple buffers and windows and want to maintain their window layouts while cleaning up buffers, particularly those who customize their workflow with Lua scripting.

Value Proposition

Developers choose bufdelete.nvim because it seamlessly integrates into existing workflows, offering a straightforward fix to a disruptive default behavior without requiring complex configuration, and it provides both command-line and Lua API for flexibility.

Overview

Delete Neovim buffers without losing window layout

Use Cases

Best For

  • Deleting buffers in Neovim without losing window splits
  • Replacing :bdelete with a layout-preserving alternative
  • Managing buffer cleanup in complex multi-window setups
  • Scripting buffer deletion in Lua-based Neovim configs
  • Handling modified buffers with interactive prompts
  • Triggering custom actions before or after buffer deletion

Not Ideal For

  • Users on older or fixed versions of Neovim who cannot update to the latest stable release
  • Developers already using comprehensive buffer managers like telescope.nvim or fzf-lua that include similar deletion features
  • Minimalist Vim users who prefer to avoid plugins and rely on native commands or simple workarounds

Pros & Cons

Pros

Layout Preservation

Replaces :bdelete and :bwipeout with commands that keep window layouts intact, solving the disruptive default behavior highlighted in the README.

Flexible Buffer Targeting

Supports deleting buffers by number, name, regex pattern, or lists, including current buffer (0), as shown in the usage examples with various input types.

Lua API for Scripting

Provides bufdelete and bufwipeout Lua functions with configurable arguments, enabling programmatic integration in Neovim configurations, as detailed in the usage section.

Custom Hooks Support

Triggers BDeletePre and BDeletePost autocommands for each buffer, allowing users to add custom actions before and after deletion, per the user autocommands documentation.

Cons

Version Compatibility Issues

Explicitly developed for the latest stable Neovim with no support for older versions, as warned in the requirements, which can hinder users on outdated distributions.

No Built-in Buffer Picker

Lacks an interactive interface for selecting buffers; users must specify buffers by identifier, requiring additional plugins or manual input for casual deletion.

Configuration Overhead for Switching

Requires setting up g:bufdelete_buf_filter or providing switchable_buffers in Lua calls to control post-deletion behavior, adding complexity for simple use cases.

Frequently Asked Questions

Quick Stats

Stars514
Forks23
Contributors0
Open Issues1
Last commit2 years ago
CreatedSince 2021

Tags

#productivity-tools#workflow-optimization#buffer-management#neovim-plugin#editor-enhancement#vim-scripting#lua-api

Built With

N
Neovim
L
Lua

Included in

Neovim20.6k
Auto-fetched 6 hours ago

Related Projects

other.nvimother.nvim

Open alternative files for the current buffer

Stars491
Forks39
Last commit1 year ago
buffer_manager.nvimbuffer_manager.nvim

A simple plugin to easily manage Neovim buffers.

Stars395
Forks18
Last commit4 months ago
nvim-early-retirementnvim-early-retirement

Send buffers into early retirement by automatically closing them after x minutes of inactivity.

Stars255
Forks7
Last commit9 days ago
hbac.nvimhbac.nvim

Heuristic buffer auto-close

Stars222
Forks12
Last commit1 month ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub