From f6908a18dc150244c9f5227889c0971fb1bf645b Mon Sep 17 00:00:00 2001 From: Hennadii Chernyshchyk Date: Tue, 14 Jun 2022 00:50:16 +0300 Subject: [PATCH] Add a shortcut to force close the current buffer --- plugin/buffers.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/plugin/buffers.lua b/plugin/buffers.lua index e97bf90..0556143 100644 --- a/plugin/buffers.lua +++ b/plugin/buffers.lua @@ -68,6 +68,9 @@ vim.api.nvim_create_user_command('BDeleteOther', close_other_buffers, { desc = ' vim.keymap.set('', '', close_other_buffers, { noremap = true }) vim.keymap.set('', '', close_buffer, { noremap = true }) +vim.keymap.set('', '', function() + close_buffer({ bang = true }) +end, { noremap = true }) vim.keymap.set({ 'i', 't' }, '', function() vim.api.nvim_input('') close_buffer()