Keybindings to close current tab?
I'm hoping to write a function to allow me to redefine evil-quit in Evil mode so that when I type :q it does the following:
- Close current window if more than one window
- Close current centaur tab if more than one tab in current tab set
- Quit emacs if only one window/one tab
To do this, I need some way to call centaur-tabs-buffer-close-tab, but I'm not sure how to get the currently active tab to pass along - I noticed that centaur-tabs-do-close only responds to a mouse event. Is there a way to replicate that behavior programatically without the mouse?
The tab displays depend on the buffer lists. If the buffer is killed, the tab is killed.
This is a bit out of the scope, so I recommend you add those changes to your configuration. You can also consider contributing to https://github.com/emacs-evil/evil-collection.
I would have thought kill-buffer is the function you want. C-x k