An open API service indexing awesome lists of open source software.

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

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).