 
 ;;; Flycheck
 (for-package 'flycheck
-             (add-hook 'flycheck-error-list-after-refresh-hook
-                       '(lambda () (-when-let (window (flycheck-get-error-list-window t))
-                                     (with-selected-window window
-                                       (fit-window-to-buffer window 30)))))
-             (add-hook 'after-init-hook #'global-flycheck-mode))
+  (add-hook 'flycheck-error-list-after-refresh-hook
+            '(lambda () (-when-let (window (flycheck-get-error-list-window t))
+                          (with-selected-window window
+                            (fit-window-to-buffer window 30)))))
+  (add-hook 'after-init-hook #'global-flycheck-mode))
 
 ;;; Flyspell
 (eval-after-load "flyspell"


;;; wgrep - write to files in search result buffer
(for-package 'wgrep
             (setq wgrep-enable-key "w")
             (setq wgrep-auto-save-buffer t))

;;; IBuffer
(autoload 'ibuffer "ibuffer" "List buffers." t)

(require 'server)
(or (server-running-p)
    (server-start))

;;; Update frame title
(setq frame-title-format


;;; git-gutter+
(for-package 'git-gutter+
  (global-git-gutter+-mode +1)
  ;; Jump between hunks
  (define-key git-command-map (kbd "n") 'git-gutter+-next-hunk)
  (define-key git-command-map (kbd "p") 'git-gutter+-previous-hunk)
  ;; Act on hunks
  (define-key git-command-map (kbd "v =") 'git-gutter+-show-hunk)
  (define-key git-command-map (kbd "r") 'git-gutter+-revert-hunks)
  ;; Stage hunk at point.
  ;; If region is active, stage all hunk lines within the region.
  (define-key git-command-map (kbd "t") 'git-gutter+-stage-hunks)
  (define-key git-command-map (kbd "c") 'git-gutter+-commit)
  (define-key git-command-map (kbd "C") 'git-gutter+-stage-and-commit)
  (define-key git-command-map (kbd "C-y") 'git-gutter+-stage-and-commit-whole-buffer)
  (define-key git-command-map (kbd "U") 'git-gutter+-unstage-whole-buffer))

;;; Ido
(require 'ido)
