 ;; esc quits
 (defun minibuffer-keyboard-quit ()
   "Abort recursive edit.
-In Delete Selection mode, if the mark is active, just deactivate it;
-then it takes a second \\[keyboard-quit] to abort the minibuffer."
+In Delete Selection mode, if the mark is active,just deactivate
+it; then it takes a second \\[keyboard-quit] to abort the
+minibuffer."
   (interactive)
   (if (and delete-selection-mode transient-mark-mode mark-active)
       (setq deactivate-mark  t)
-    (when (get-buffer "*Completions*")
-      (delete-windows-on "*Completions*"))
-    (abort-recursive-edit)))
+      (when (get-buffer "*Completions*")
+        (delete-windows-on "*Completions*"))
+      (abort-recursive-edit)))
 
 ;; 2 spaces for tabs
 (setq-default tab-width 2 indent-tabs-mode nil)


  (dolist (map  (list minibuffer-local-isearch-map))
    (define-key map (kbd "n") 'isearch-printing-char))
  (global-set-key [escape] 'evil-exit-emacs-state)

  (define-key evil-normal-state-map (kbd "C-k") (lambda () (interactive) (evil-scroll-up nil)))

(require 'evil-magit)
(require 'general)

(defun my-default-cursor()
  "Cursor color indicates mode: white = Emacs, green = evil (Vi/Vim)."
  (if (string= (symbol-value 'evil-state) "normal")
      (set-cursor-color "green")
      (set-cursor-color "white")))

(evil-mode 1)
(evil-collection-init)
