You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If suppose I have many splits open and want to delete the useless buffers which are not currently in use (loaded). There must be a command to do this. I think this plugin will be "complete" if this is implemented.
I tried to do something like this
-- save and delete all unloaded bufferslocalbufs=vim.api.nvim_list_bufs()
for_, bufinipairs(bufs) dolocalmodifiable=vim.api.nvim_buf_get_option(buf, "modifiable")
ifmodifiablethenvim.cmd("silent w")
endifnotvim.api.nvim_buf_is_loaded(buf) thenvim.api.nvim_buf_delete(buf, { force=true })
endend
I don't know why, but it's not working :/
It would be great if you look into this and try to implement this functionality :)
The text was updated successfully, but these errors were encountered:
iamhrigved
changed the title
Add command to delete all buffers except "loaded" buffers
Feature Request: Add command to delete all buffers except "loaded" buffers
Jul 5, 2024
If suppose I have many splits open and want to delete the useless buffers which are not currently in use (loaded). There must be a command to do this. I think this plugin will be "complete" if this is implemented.
I tried to do something like this
I don't know why, but it's not working :/
It would be great if you look into this and try to implement this functionality :)
The text was updated successfully, but these errors were encountered: