Add ibuffer-sidebar, make ibuffer display flat list of buffers

This commit is contained in:
contrapunctus 2022-04-30 21:32:43 +05:30
parent 805ad94865
commit 300bb816c8
1 changed files with 25 additions and 16 deletions

View File

@ -3768,19 +3768,6 @@ But with =initials=, the desired completion is often buried in the results. That
(interactive)
(kill-buffer nil))
(use-package ibuffer
:bind (("C-x C-b" . ibuffer)
:map ibuffer-mode-map
("m" . nil)
("U" . nil)
("m f" . ibuffer-mark-by-file-name-regexp)
("m m" . ibuffer-mark-by-mode-regexp)
("m n" . ibuffer-mark-by-name-regexp)
("M" . ibuffer-mark-forward)
("r" . ibuffer-do-replace-regexp)
("U" . ibuffer-unmark-all))
:hook (ibuffer-mode . ibuffer-set-filter-groups-by-mode))
;; (require 'win-switch)
;; (global-set-key "\C-xo" 'win-switch-dispatch)
;; (win-switch-setup-keys-ijkl)
@ -3926,9 +3913,18 @@ jumping to match from =M-x grep= , too)
:END:
#+BEGIN_SRC emacs-lisp
(use-package ibuffer
:bind
(:map ibuffer-mode-map
("X" . 'ibuffer-do-kill-on-deletion-marks))) ;; Boon hijacks the x key.
:bind (("C-x C-b" . ibuffer)
:map ibuffer-mode-map
("m" . nil)
("U" . nil)
("m f" . ibuffer-mark-by-file-name-regexp)
("m m" . ibuffer-mark-by-mode-regexp)
("m n" . ibuffer-mark-by-name-regexp)
("M" . ibuffer-mark-forward)
("r" . ibuffer-do-replace-regexp)
("U" . ibuffer-unmark-all)
("X" . 'ibuffer-do-kill-on-deletion-marks)) ;; Boon hijacks the x key.ibuffer-set-filter-groups-by-mode
:config (setq ibuffer-show-empty-filter-groups nil))
#+END_SRC
#+BEGIN_SRC emacs-lisp
@ -3999,6 +3995,19 @@ jumping to match from =M-x grep= , too)
)
#+END_SRC
** ibuffer-sidebar
:PROPERTIES:
:CUSTOM_ID: ibuffer-sidebar
:END:
#+BEGIN_SRC emacs-lisp
(use-package ibuffer-sidebar
:ensure t
:bind (:map ibuffer-name-map
([(mouse-1)] . ibuffer-mouse-visit-buffer)
([down-mouse-3] . nil)
([(mouse-3)] . ibuffer-mouse-toggle-mark)))
#+END_SRC
** midnight-mode (automatic buffer cleanup)
:PROPERTIES:
:CUSTOM_ID: midnight-mode-(automatic-buffer-cleanup)