  ;; If there is more than one, they won't work right.
  '(package-selected-packages
    (quote
-    (use-package spacemacs-theme rainbow-delimiters helm evil-leader evil-escape))))
+    (diminish evil-numbers ivy use-package spacemacs-theme rainbow-delimiters evil-leader evil-escape))))
 (custom-set-faces
  ;; custom-set-faces was added by Custom.
  ;; If you edit it by hand, you could mess it up, so be careful.

  :init (load-theme 'spacemacs-dark t))


;;; Set `ESC' to `C-g' (no more `ESC-ESC-ESC')
;;;(global-set-key (kbd "<escape>") 'keyboard-escape-quit)
(define-key key-translation-map (kbd "ESC") (kbd "C-g"))


(custom-set-variables
 ;; custom-set-variables was added by Custom.
 ;; If you edit it by hand, you could mess it up, so be careful.


(unless (package-installed-p 'use-package)
  (package-refresh-contents)
  (package-install 'use-package)
  (package-install 'diminish))
(eval-when-compile
  (require 'use-package))
(require 'diminish)


(use-package evil
  :ensure t
  :init
  (setq evil-want-C-u-scroll t)
  (setq evil-want-C-i-jump nil) ; http://stackoverflow.com/questions/22878668/emacs-org-mode-evil-mode-tab-key-not-working
  :config

  (use-package evil-leader
    :ensure t
    :config
    (setq evil-leader/in-all-states t)
    (evil-leader/set-leader "SPC")
    (evil-leader/set-key
      "SPC" 'execute-extended-command
      "ff"  'find-file
      "fs"  'save-buffer
      "qq"  'save-buffers-kill-terminal)
    (global-evil-leader-mode))

  (use-package evil-escape
    :ensure t
    :diminish evil-escape-mode
    :init (setq evil-escape-key-sequence "jk")
    :config (evil-escape-mode))

  (use-package evil-numbers
    :ensure t
    :config
    (define-key evil-normal-state-map (kbd "C-a") 'evil-numbers/inc-at-pt)
    (define-key evil-normal-state-map (kbd "C-x") 'evil-numbers/dec-at-pt))

  (evil-mode 1))

(use-package ivy
  :ensure t
  :diminish ivy-mode
  :config (ivy-mode 1))

(use-package org :ensure t)

(use-package magit :defer t)

; TODO enable only for Lisps
(use-package rainbow-delimiters
  :ensure t
  :config (add-hook 'prog-mode-hook 'rainbow-delimiters-mode))
