mirror of
https://github.com/pnx/dotfiles
synced 2026-06-16 11:24:55 +02:00
touching nvim in special places
This commit is contained in:
parent
1c5dd5bd9c
commit
e8d1b84519
11 changed files with 121 additions and 59 deletions
17
nvim/lua/utils/buffers.lua
Normal file
17
nvim/lua/utils/buffers.lua
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
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
|
||||
Loading…
Add table
Add a link
Reference in a new issue