Create vim bufhidden helper plugin

This commit is contained in:
Talia 2024-06-20 14:46:10 +02:00
parent c703fb7579
commit 5d10b4ecec
Signed by: darkwiiplayer
GPG key ID: 7808674088232B3E

View file

@ -0,0 +1,13 @@
vim.api.nvim_create_user_command("BHD", function()
vim.bo.bufhidden = "delete"
end, {})
vim.g.ephemeral_buffers = false
vim.api.nvim_create_autocmd("BufAdd", {
callback = function(args)
if vim.g.ephemeral_buffers then
vim.bo[args.buf].bufhidden = "delete"
end
end
})