 (server-mode)
 (autopair-mode)
 
+;; Add evil to many places
+(add-to-list 'load-path (expand-file-name "~/.emacs.d/repos/evil-special-modes" user-emacs-directory))
+(when (require 'evil-special-modes nil t) (evil-special-modes-init))
+;; Add evil to minibuffer
+(require 'evil-minibuffer)
+(evil-minibuffer-init)
+
 ;; Make Y = y$
 (setq-default evil-want-Y-yank-to-eol t)
 


;; Highlight current line
(global-hl-line-mode)

;; Set leader
(evil-leader/set-leader ",")

;; Relative line numbers
(global-linum-mode)

;; Insert indentations on tab press
(define-key evil-insert-state-map (kbd "TAB") 'tab-to-tab-stop)

;; define a prefix keymap
(progn
  (define-prefix-command 'leader)

  ;; Move quickly
  (define-key leader (kbd "w") 'evil-window-up)
  (define-key leader (kbd "a") 'evil-window-left)
  (define-key leader (kbd "s") 'evil-window-down)
  (define-key leader (kbd "d") 'evil-window-right)

  ;; Resizing mappings
  (define-key leader (kbd "h") 'evil-window-decrease-width)
  (define-key leader (kbd "j") 'evil-window-increase-height )
  (define-key leader (kbd "k") 'evil-window-decrease-height)
  (define-key leader (kbd "l") 'evil-window-increase-width)
  )

(eval-after-load 'evil-maps
  '(progn
    (define-key evil-motion-state-map (kbd ",") 'leader)))

;; Delete buffer
(evil-leader/set-key "bd" 'kill-buffer)
