From 5795aa73ef8cd7ffd5db6debb8d2a049427483d3 Mon Sep 17 00:00:00 2001 From: Baipyrus Date: Thu, 17 Oct 2024 10:54:10 +0200 Subject: [PATCH] use alt-file when deleting current buffer --- lua/keymaps.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/keymaps.lua b/lua/keymaps.lua index faabbfa..fb6a6ac 100644 --- a/lua/keymaps.lua +++ b/lua/keymaps.lua @@ -47,7 +47,7 @@ vim.keymap.set('n', 'bd', function() -- Get current buffer local buf = vim.api.nvim_get_current_buf() -- Switch to different buffer - vim.cmd 'bp' + vim.cmd 'exe "norm \\"' -- Delete saved buffer vim.api.nvim_buf_delete(buf, {}) end, { desc = '[B]uffer [D]elete' })