1 ;;; init-ibuffer.el --- ibuffer settings -*- lexical-binding: t -*-
4 ;; TODO: enhance ibuffer-fontification-alist
5 ;; See http://www.reddit.com/r/emacs/comments/21fjpn/fontifying_buffer_list_for_emacs_243/
9 (require-package 'ibuffer-vc
)
11 (defun ibuffer-set-up-preferred-filters ()
12 (ibuffer-vc-set-filter-groups-by-vc-root)
13 (unless (eq ibuffer-sorting-mode
'filename
/process
)
14 (ibuffer-do-sort-by-filename/process
)))
16 (add-hook 'ibuffer-hook
'ibuffer-set-up-preferred-filters
)
18 (setq-default ibuffer-show-empty-filter-groups nil
)
20 (sanityinc/fullframe-mode
'ibuffer-mode
)
23 (with-eval-after-load 'ibuffer
24 ;; Use human readable Size column instead of original one
25 (define-ibuffer-column size-h
26 (:name
"Size" :inline t
)
27 (file-size-human-readable (buffer-size))))
30 ;; Modify the default ibuffer-formats (toggle with `)
32 '((mark modified read-only vc-status-mini
" "
33 (name 22 22 :left
:elide
)
37 (mode 12 12 :left
:elide
)
40 (mark modified read-only vc-status-mini
" "
41 (name 22 22 :left
:elide
)
45 (mode 14 14 :left
:elide
)
47 (vc-status 12 12 :left
)
51 (setq ibuffer-filter-group-name-face
'font-lock-doc-face
)
53 (global-set-key (kbd "C-x C-b") 'ibuffer
)
55 (provide 'init-ibuffer
)
56 ;;; init-ibuffer.el ends here