https://github.com/lunatacet/delbuf.vim
Delete buffers without closing windows and tabs
https://github.com/lunatacet/delbuf.vim
vim
Last synced: 9 months ago
JSON representation
Delete buffers without closing windows and tabs
- Host: GitHub
- URL: https://github.com/lunatacet/delbuf.vim
- Owner: lunatacet
- Created: 2025-08-05T07:52:32.000Z (11 months ago)
- Default Branch: master
- Last Pushed: 2025-08-06T04:37:52.000Z (11 months ago)
- Last Synced: 2025-09-26T01:52:59.767Z (9 months ago)
- Topics: vim
- Language: Vim Script
- Homepage:
- Size: 2.93 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Introduction
In Vim, deleting active buffers leads to associated windows and tabs being automatically closed - Delbuf.vim helps manoeuvre around this.
## Installation
```
Plug 'lunatacet/Delbuf.vim'
```
## Usage
`d` to delete the buffer displayed in the currently active window (even if the buffer is modified, ie like `:bd!`).
## Details
The default mapping is defined as:
```
nnoremap d call Delbuf#Delbuf('bd!')
```
`Delbuf#Delbuf()` accepts two values as an argument: `'bd'` or `'bd!'`. This determines whether modified buffers can be deleted.
`set hidden` is necessary to delete modified buffers successfully (even with `'bd!'` as an argument).