From c2fa5076c86f2292738f099328d151ab6c45d789 Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Thu, 4 Mar 2021 18:36:14 -0600 Subject: Configure ibuffer --- init.el | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/init.el b/init.el index a37c715..fdee1bb 100644 --- a/init.el +++ b/init.el @@ -761,7 +761,27 @@ (use-package ibuffer :straight nil - :bind ([remap list-buffers] . #'ibuffer)) + :bind ([remap list-buffers] . #'ibuffer) + ;; from http://martinowen.net/blog/2010/02/03/tips-for-emacs-ibuffer.html + :init + (setq ibuffer-saved-filter-groups ; this could still be improved + '(("home" + ("emacs-config" (or (filename . ".emacs.d") + (filename . "etc/emacs"))) + ("Org" (or (mode . org-mode) + (filename . "OrgMode"))) + ("Dired" (mode . dired-mode)) + ("Magit" (name . "magit")) + ("Help" (or (name . "\*Help\*") + (name . "\*Apropos\*") + (name . "\*info\*"))))) + ibuffer-expert t ; don't ask if i wanna kill unmodifieds + ibuffer-show-empty-filter-groups nil + ) + (defun hook--ibuffer-setup () + (ibuffer-auto-mode +1) + (ibuffer-switch-to-saved-filter-groups "home")) + (add-hook 'ibuffer-mode-hook #'hook--ibuffer-setup)) (setq-default browse-url-browser-function 'browse-url-firefox -- cgit 1.4.1-21-gabe81