Closed strash closed 1 year ago
Sorry I didn't specify which window I meant, it's the popup window. Thought I can assign a command inside the plugin config that would only work when the buffer manager is active. Thanks for your examples, I think I now know what to do.
Okay. Even so, if you consider that it can't be done, let me know.
I did this and it works as expected:
vim.api.nvim_create_autocmd({
"FileType",
}, {
callback = function(args)
if args.match == "buffer_manager" then
vim.keymap.set({ "i", "n" }, "<C-c>", function() require("buffer_manager.ui").toggle_quick_menu() end, { buffer = true })
end
end,
group = group
})
Yes, it is probably the best way to do it. Thanks for sharing.
Do you mean to close the popup menu? If that's what you mean, I think this way is the right way:
On the other hand, if you mean to close the buffer, this way:
Lastly, if you mean to close a "vim window", you cannot do it using the plugin.