numToStr / BufOnly.nvim

Lua/Neovim port of BufOnly.vim with some changes

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

About

Lua/Neovim port of BufOnly.vim with some changes


Languages

Language:Lua 95.2%Language:Vim Script 4.8%