improve erc-sasl
[Emacs.git] / lisp / init-ibuffer.el
blobacc2960f5e92fcb1ad276b9bf2039c88c011f27f
1 ;;; init-ibuffer.el --- ibuffer settings -*- lexical-binding: t -*-
2 ;;; Commentary:
4 ;; TODO: enhance ibuffer-fontification-alist
5 ;; See http://www.reddit.com/r/emacs/comments/21fjpn/fontifying_buffer_list_for_emacs_243/
7 ;;; Code:
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 `)
31 (setq ibuffer-formats
32 '((mark modified read-only vc-status-mini " "
33 (name 22 22 :left :elide)
34 " "
35 (size-h 9 -1 :right)
36 " "
37 (mode 12 12 :left :elide)
38 " "
39 vc-relative-file)
40 (mark modified read-only vc-status-mini " "
41 (name 22 22 :left :elide)
42 " "
43 (size-h 9 -1 :right)
44 " "
45 (mode 14 14 :left :elide)
46 " "
47 (vc-status 12 12 :left)
48 " "
49 vc-relative-file)))
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