Create vim bufhidden helper plugin
This commit is contained in:
parent
c703fb7579
commit
5d10b4ecec
1 changed files with 13 additions and 0 deletions
13
vim/plugin/bufhiddendelete.lua
Normal file
13
vim/plugin/bufhiddendelete.lua
Normal 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
|
||||||
|
})
|
Loading…
Reference in a new issue