Skip to content

A Neovim plugin to improve buffer deletion

License

Notifications You must be signed in to change notification settings

ojroques/nvim-bufdel

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

nvim-bufdel

A very small Neovim plugin to improve the deletion of buffers.

Features:

  • Preserve the window layout after deleting a buffer.
  • Cycle through buffers according to their buffer number, exactly like tabs in Chrome / Firefox. This is especially helpful when using a bufferline.
  • Delete terminal buffers without being prompted.
  • Exit Neovim when there is only one buffer left.

Installation

With Packer

cmd 'packadd packer.nvim'
return require('packer').startup(function()
  use {'ojroques/nvim-bufdel'}
end)

With Plug

call plug#begin()
Plug 'ojroques/nvim-bufdel'
call plug#end()

Usage

Delete the current buffer:

:BufDel

Delete the current buffer and ignore changes:

:BufDel!

Delete a buffer by its name or number:

:BufDel <bufexpr>

License

LICENSE