All Projects → ojroques → nvim-bufdel

ojroques / nvim-bufdel

Licence: BSD-2-Clause license
A Neovim plugin to improve buffer deletion

Programming Languages

lua
6591 projects
Vim Script
2826 projects

Projects that are alternatives of or similar to nvim-bufdel

code runner.nvim
Neovim plugin.The best code runner you could have, it is like the one in vscode but with super powers, it manages projects like in intellij but without being slow
Stars: ✭ 234 (+162.92%)
Mutual labels:  nvim-plugin, nvim-lua
jumpwire.nvim
Jump easily between related files.
Stars: ✭ 16 (-82.02%)
Mutual labels:  nvim-plugin, nvim-lua
monokai.nvim
Monokai theme for Neovim written in Lua.
Stars: ✭ 154 (+73.03%)
Mutual labels:  nvim-plugin, nvim-lua
better-escape.nvim
Escape from insert mode without delay when typing
Stars: ✭ 166 (+86.52%)
Mutual labels:  nvim-plugin, nvim-lua
virtual-types.nvim
Neovim plugin that shows type annotations as virtual text
Stars: ✭ 171 (+92.13%)
Mutual labels:  nvim-plugin
Neovim-from-scratch
📚 A Neovim config designed from scratch to be understandable
Stars: ✭ 3,825 (+4197.75%)
Mutual labels:  nvim-plugin
specs.nvim
👓 A fast and lightweight Neovim lua plugin to keep an eye on where your cursor has jumped.
Stars: ✭ 204 (+129.21%)
Mutual labels:  nvim-lua
dotfiles
My dotfiles for Neovim, Kitty terminal, Zsh, and a few other things.
Stars: ✭ 101 (+13.48%)
Mutual labels:  nvim-lua
substitute.nvim
Neovim plugin introducing a new operators motions to quickly replace and exchange text.
Stars: ✭ 82 (-7.87%)
Mutual labels:  nvim-plugin
cutlass.nvim
Plugin that adds a 'cut' operation separate from 'delete'
Stars: ✭ 78 (-12.36%)
Mutual labels:  nvim-plugin
vim-lamp
💡Language Server Protocol client for Vim.
Stars: ✭ 34 (-61.8%)
Mutual labels:  nvim-plugin
lspcontainers.nvim
Neovim plugin for lspcontainers.
Stars: ✭ 157 (+76.4%)
Mutual labels:  nvim-plugin
navigator.lua
Source code analysis & navigation plugin for Neovim. Navigate codes like a breeze🎐. Exploring LSP and 🌲Treesitter symbols a piece of 🍰. Take control like a boss 🦍.
Stars: ✭ 781 (+777.53%)
Mutual labels:  nvim-plugin
cmp-tmux
Tmux completion source for nvim-cmp and nvim-compe
Stars: ✭ 98 (+10.11%)
Mutual labels:  nvim-plugin
telescope-zoxide
An extension for telescope.nvim that allows you operate zoxide within Neovim.
Stars: ✭ 126 (+41.57%)
Mutual labels:  nvim-plugin
lesvim
Nvim config focus on Javascript, Typescript, Rust and Lua - 🚀 💪 ( Fast and Powerfull ) - Deno and other typescript LSP working well together
Stars: ✭ 69 (-22.47%)
Mutual labels:  nvim-lua
aerial.nvim
Neovim plugin for a code outline window
Stars: ✭ 485 (+444.94%)
Mutual labels:  nvim-plugin
qf helper.nvim
A collection of improvements for the quickfix buffer
Stars: ✭ 70 (-21.35%)
Mutual labels:  nvim-plugin
nvim-ghost.nvim
👻 GhostText plugin for Neovim with zero dependencies 🎉 Supports neovim running inside WSL too! 🥳 Windows/Linux/macOS supported out-of-the-box! 😄 (Other OSes need python3.6+ installed)
Stars: ✭ 32 (-64.04%)
Mutual labels:  nvim-plugin
nvim-toggle-terminal
NeoVim plugin that toggles a terminal buffer in the current window maintaining the same shell instance
Stars: ✭ 54 (-39.33%)
Mutual labels:  nvim-plugin

nvim-bufdel

A small Neovim plugin to improve the deletion of buffers.

Improvements:

  • Preserve the layout of windows. Deleting a buffer will no longer close any window unexpectedly (see demo).
  • Cycle through buffers according to their number (configurable). This is especially helpful when using a bufferline: we get the same behavior as closing tabs in Chrome / Firefox (see demo).
  • Terminal buffers are deleted without prompt.
  • Exit Neovim when last buffer is deleted (configurable).
  • Add commands to close all listed buffers and to close them all except the current one.

demo

Here the same buffer is displayed in left and top-right window. Deleting that buffer preserves the window layout and the first buffer with a number greater than the deleted one is selected instead (the one immediately to the right in the bufferline).

Installation

With packer.nvim:

use {'ojroques/nvim-bufdel'}

With paq-nvim:

paq {'ojroques/nvim-bufdel'}

Usage

Delete the current buffer:

:BufDel

Delete the current buffer and ignore changes:

:BufDel!

Delete a buffer by its name or number (use quotes in case the buffer name is a number):

:BufDel <bufexpr>

Delete all listed buffers (add ! to ignore changes):

:BufDelAll

Delete all listed buffers except the current one (add ! to ignore changes):

:BufDelOthers

Configuration

You can pass options to the setup() function. Here are the default options:

require('bufdel').setup {
  next = 'tabs',  -- or 'cycle, 'alternate'
  quit = true,    -- quit Neovim when last buffer is closed
}

The next option determines the next buffer to display after deletion. Supported values:

  • cycle: cycle through buffers according to their number.
  • tabs (default): like cycle but when the buffer with highest number is deleted, display the new highest buffer instead of going back to the first one.
  • alternate: switch to the alternate buffer (same behavior as without the plugin).
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].