 (require 'evil)
 (require 'fill-column-indicator)
 (require 'paren)
+(require 'ibuffer)
 
 (evil-mode t)
 

;; TODO: Show size column in ibuffer with kB or MB.
;; TODO: Autocompletion.
;; TODO: Snippets.
;; TODO: Magit.


(setq show-paren-delay 0)
(show-paren-mode t)

;; Ibuffer.
;; Use human readable Size column instead of original one.
(define-ibuffer-column size-h
  (:name "Size" :inline t)
  (cond
   ((> (buffer-size) 1000000) (format "%7.1fM" (/ (buffer-size) 1000000.0)))
   ((> (buffer-size) 100000) (format "%7.0fk" (/ (buffer-size) 1000.0)))
   ((> (buffer-size) 1000) (format "%7.1fk" (/ (buffer-size) 1000.0)))
   (t (format "%8d" (buffer-size)))))

;; Modify the default ibuffer formats.
(setq ibuffer-formats
      '((mark modified read-only " "
              (name 18 18 :left :elide)
              " "
              (size-h 9 -1 :right)
              "  "
              (mode 16 16 :left :elide)
              " "
              filename-and-process)))

;; Theme.
(load-theme 'sunburst t)
