blob: 10e05c771c29fa9f968329e6cc86161e256d9f7e (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
;;; init-ibuffer.el --- configure ibuffer and vc integration -*- lexical-binding:t -*-
;;; Commentary:
;;; Code:
(use-package ibuffer
:init
;; disable confirmation for killing unmodified buffers
(setq ibuffer-expert t)
;; sort buffers by name
(setq-default ibuffer-default-sorting-mode 'alphabetic)
;; hide empty filter groups
(setq ibuffer-show-empty-filter-groups nil)
;; use ibuffer
:bind (("C-x C-b" . ibuffer-other-window)
:map ibuffer-mode-map
;; make C-o and o behave as in dired
("o" . ibuffer-visit-buffer-other-window)
("C-o" . ibuffer-visit-buffer-other-window-noselect)))
(use-package ibuffer-vc
:ensure t
:after ibuffer
:init
;; enable for remote files
(setq ibuffer-vc-skip-if-remote nil)
;; group ibuffer by repository root
:hook (ibuffer-mode . ibuffer-vc-set-filter-groups-by-vc-root)
:bind (:map ibuffer-mode-map
;; g updates both buffers and repository groups
("g" . ibuffer-vc-set-filter-groups-by-vc-root)))
(provide 'init-ibuffer)
;;; init-ibuffer.el ends here
|