Skip to content

Latest commit

 

History

History
43 lines (27 loc) · 761 Bytes

README.md

File metadata and controls

43 lines (27 loc) · 761 Bytes

Lua/Neovim port of https://github.com/vim-scripts/BufOnly.vim with some changes

BufOnly.nvim

Delete all the buffers except the current, not modified and modifiable buffer.

Requirements

  • Neovim 0.5

Install

use { "numtostr/BufOnly.nvim", "cmd": "BufOnly" }
Plug 'numtostr/BufOnly.nvim', { 'on': 'BufOnly' }

Usage

:BufOnly

Options

  • Delete non modifiable buffer like NERD_tree, false by default
vim.g.bufonly_delete_non_modifiable = true

Simple config

vim.fn.nvim_set_keymap('n', '<leader>x', ':BufOnly<CR>', { noremap = true, silent = true })