mirror of
https://github.com/pnx/dotfiles
synced 2026-06-16 19:30:01 +02:00
17 lines
319 B
Lua
17 lines
319 B
Lua
local M = {}
|
|
|
|
function M.CloseOthers()
|
|
for _, i in ipairs(vim.api.nvim_list_bufs()) do
|
|
if i ~= vim.api.nvim_get_current_buf() then
|
|
vim.api.nvim_buf_delete(i, {})
|
|
end
|
|
end
|
|
end
|
|
|
|
function M.CloseAll()
|
|
for _, i in ipairs(vim.api.nvim_list_bufs()) do
|
|
vim.api.nvim_buf_delete(i, {})
|
|
end
|
|
end
|
|
|
|
return M
|