 
 ;; N.B. evil-mode must be enabled after global-evil-leader-mode
 (use-package evil
-	:init
-		(setq evil-shift-width 3)
-		(setq-default evil-symbol-word-search t)
-		(setq evil-search-module 'evil-search)
-	:config
-		(use-package evil-args)
-		(use-package evil-textobj-anyblock)
-		(use-package evil-commentary
-		  :config (evil-commentary-mode)
-		  :diminish evil-commentary-mode)
-		(use-package evil-leader
-			:init
-				(setq evil-leader/in-all-states 1)
-			:config
-				(global-evil-leader-mode t)
-				(evil-leader/set-leader "<SPC>")
-				(evil-leader/set-key
-					";" 'evil-jump-forward
-					"," 'evil-jump-backward
-					"w" 'save-buffer
-					"x" 'kill-buffer
-					"e" 'pp-eval-last-sexp
-					"v"  'exchange-point-and-mark
-					"c" 'use-evil-clipboard-register
-					"s" 'use-evil-selection-register
-					"a" 'align
-					)
-			)  ; evil-leader
-		(use-package powerline-evil
-			:config
-				(powerline-default-theme)
-				(display-time-mode t)
-			)
-		; use SPC prefix before motion to see helpers
-		(use-package evil-easymotion
-			:config
-			(evilem-default-keybindings "SPC"))
-		(evil-set-initial-state 'git-rebase-mode 'emacs)
-		(evil-set-initial-state 'deft-mode 'insert)
-		(evil-set-initial-state 'magit-branch-manager-mode 'emacs)
-		; note evil-set-initial-state didn't work for this mode
-		(add-hook 'with-editor-mode-hook 'evil-insert-state)
-		(define-key evil-inner-text-objects-map "a" 'evil-inner-arg)
-		(define-key evil-outer-text-objects-map "a" 'evil-outer-arg)
-		(define-key evil-inner-text-objects-map "b" 'evil-textobj-anyblock-inner-block)
-		(define-key evil-outer-text-objects-map "b" 'evil-textobj-anyblock-a-block)
-		(define-key evil-normal-state-map (kbd "j") 'evil-next-visual-line)
-		(define-key evil-normal-state-map (kbd "k") 'evil-previous-visual-line)
-		; buffer swapping, next/previous
-		(define-key evil-normal-state-map (kbd "<RET>") 'switch-to-previous-buffer)
-		; esc key (from WikEmacs)
-		(define-key evil-normal-state-map [escape] 'keyboard-quit)
-		(define-key evil-visual-state-map [escape] 'keyboard-quit)
-		; scroll keeping cursor in place
-		(define-key evil-normal-state-map (kbd "C-j")
-			(lambda () (interactive)  (evil-scroll-line-down 1) (evil-next-visual-line 0)))
-		(define-key evil-normal-state-map (kbd "C-k")
-			(lambda () (interactive) (evil-scroll-line-up 1) (evil-previous-visual-line 0)))
-		; Overload shifts so that they don't lose the selection
-		(define-key evil-visual-state-map (kbd ">") 'me/evil-shift-right-visual)
-		(define-key evil-visual-state-map (kbd "<") 'me/evil-shift-left-visual)
-		(define-key evil-visual-state-map [tab] 'me/evil-shift-right-visual)
-		(define-key evil-visual-state-map [S-tab] 'me/evil-shift-left-visual)
-		(evil-mode 1)
-	) ; evil
+  :init
+  (progn
+    (setq-default evil-symbol-word-search t)
+    (setq evil-shift-width 3
+          evil-search-module 'evil-search))
+  :config
+  (progn
+    (use-package evil-args)
+    (use-package evil-textobj-anyblock)
+    (use-package evil-commentary
+      :config (evil-commentary-mode)
+      :diminish evil-commentary-mode)
+    (use-package evil-leader
+      :init
+      (progn
+        (setq evil-leader/in-all-states 1))
+      :config
+      (progn
+        (global-evil-leader-mode t)
+        (evil-leader/set-leader "<SPC>")
+        (evil-leader/set-key
+          ";" 'evil-jump-forward
+          "," 'evil-jump-backward
+          "w" 'save-buffer
+          "x" 'kill-buffer
+          "e" 'pp-eval-last-sexp
+          "v"  'exchange-point-and-mark
+          "c" 'me:use-evil-clipboard-register
+          "s" 'me:use-evil-selection-register
+          "a" 'align)))
+    (use-package powerline-evil
+      :config
+      (progn
+        (powerline-default-theme)
+        (display-time-mode t)))
+    ; use SPC prefix before motion to see helpers
+    (use-package evil-easymotion
+      :config
+      (progn
+        (evilem-default-keybindings "SPC")))
+
+    (evil-set-initial-state 'git-rebase-mode 'emacs)
+    (evil-set-initial-state 'deft-mode 'insert)
+    (evil-set-initial-state 'magit-branch-manager-mode 'emacs)
+    ; note evil-set-initial-state didn't work for this mode
+    (add-hook 'with-editor-mode-hook 'evil-insert-state)
+    (define-key evil-inner-text-objects-map "a" 'evil-inner-arg)
+    (define-key evil-outer-text-objects-map "a" 'evil-outer-arg)
+    (define-key evil-inner-text-objects-map "b" 'evil-textobj-anyblock-inner-block)
+    (define-key evil-outer-text-objects-map "b" 'evil-textobj-anyblock-a-block)
+    (define-key evil-normal-state-map (kbd "j") 'evil-next-visual-line)
+    (define-key evil-normal-state-map (kbd "k") 'evil-previous-visual-line)
+    ; buffer swapping, next/previous
+    (define-key evil-normal-state-map (kbd "<RET>") 'me:switch-to-previous-buffer)
+    ; esc key (from WikEmacs)
+    (define-key evil-normal-state-map [escape] 'keyboard-quit)
+    (define-key evil-visual-state-map [escape] 'keyboard-quit)
+    ; scroll keeping cursor in place
+    (define-key evil-normal-state-map (kbd "C-j")
+      (lambda () (interactive)  (evil-scroll-line-down 1) (evil-next-visual-line 0)))
+    (define-key evil-normal-state-map (kbd "C-k")
+      (lambda () (interactive) (evil-scroll-line-up 1) (evil-previous-visual-line 0)))
+    ; Overload shifts so that they don't lose the selection
+    (define-key evil-visual-state-map (kbd ">") 'me:evil-shift-right-visual)
+    (define-key evil-visual-state-map (kbd "<") 'me:evil-shift-left-visual)
+    (define-key evil-visual-state-map [tab] 'me:evil-shift-right-visual)
+    (define-key evil-visual-state-map [S-tab] 'me:evil-shift-left-visual)
+    (evil-mode 1)))
 
 
 (use-package diminish
-	:config
-		(diminish 'undo-tree-mode)
-	)
+  :config
+  (progn
+    (diminish 'undo-tree-mode)))
 
 (use-package ws-butler
-	:config
-	(ws-butler-global-mode t)
-	:defer 3
-	)
+  :config
+  (progn
+    (ws-butler-global-mode t))
+  :defer 3)
 
 (use-package shell-pop
-	:init
-		(setq shell-pop-internal-mode "ansi-term")
-		(setq shell-pop-term-shell "/bin/bash")
-		(setq shell-pop-window-size 40)
-		(setq shell-pop-window-position "top")
-		(setq shell-pop-universal-key "<f8>")
-	:bind
-		("<f8>" . shell-pop)
-	)
+  :init
+  (progn
+    (setq shell-pop-internal-mode "ansi-term"
+          shell-pop-term-shell "/bin/bash"
+          shell-pop-window-size 40
+          shell-pop-window-position "top"
+          shell-pop-universal-key "<f8>"))
+  :bind
+  ("<f8>" . shell-pop))
 
 (use-package guide-key
-	:defer 3
-	:init
-	(setq guide-key/guide-key-sequence '(
-		"<SPC>" "C-x" "C-h" "C-w" "C-c"
-		"<f4>" "<f6>" "<f7>" "z" "g" ))
-	:config
-		(guide-key-mode 1)
-	:diminish guide-key-mode)
+  :defer 3
+  :init
+  (progn
+    (setq guide-key/guide-key-sequence '("<SPC>" "C-x" "C-h" "C-w" "C-c"
+                                         "<f4>" "<f6>" "<f7>" "z" "g" )))
+  :config
+  (progn
+    (guide-key-mode 1))
+  :diminish guide-key-mode)
 
 (use-package magit
-	:init
-	:config
-	; get out of magit blame mode
-		(define-key magit-blame-mode-map (kbd "<f7> b") 'magit-blame-quit)
-	; keep me accidently hitting k key due to evil habits
-	; this should suffice until magit mapping is figured out
-		(define-key magit-mode-map (kbd "<DEL>") 'magit-delete-thing)
-		(define-key magit-mode-map "k" nil)
-	:bind
-		("<f7> g" . magit-status)
-		("<f7> b" . magit-blame)
-		("<f7> a" . magit-run-git-gui-blame)
-	:defer t)
+  :init
+  :config
+  (progn
+    ;get out of magit blame mode
+    (define-key magit-blame-mode-map (kbd "<f7> b") 'magit-blame-quit)
+    ; keep me accidently hitting k key due to evil habits
+    ; this should suffice until magit mapping is figured out
+    (define-key magit-mode-map (kbd "<DEL>") 'magit-delete-thing)
+    (define-key magit-mode-map "k" nil))
+  :bind
+  (("<f7> g" . magit-status)
+   ("<f7> b" . magit-blame)
+   ("<f7> a" . magit-run-git-gui-blame))
+  :defer t)


;; Text handling
(visual-line-mode t)                                        ; edit visual lines
(setq-default tab-width 3)                                  ; ideal tab width
(setq-default indent-tabs-mode t)                           ; enable tabs for most files
(setq standard-indent 3)                                    ; ideal indent :)
(setq x-select-enable-clipboard nil)                        ; make cut/paste function correctly
(add-hook 'focus-out-hook (                                 ; save on focus lost
		lambda ()
			(interactive)
			(save-some-buffers t)))
(setq sentence-end-double-space nil)                        ; sentences end with one space
(setq-default fill-column 120)                              ; auto-wrap only very long lines
(electric-indent-mode +1)                                   ; turn on electric mode globally

;; Align with spaces only


(require 'package)

(setq package-archives '(("melpa" . "http://melpa.milkbox.net/packages/")
                         ("org"   . "http://orgmode.org/elpa/")
                         ("gnu"   . "http://elpa.gnu.org/packages/")))

(package-initialize)

(when (not package-archive-contents)
  (package-refresh-contents))

(when (not (package-installed-p 'use-package ))
  (package-install 'use-package))

(eval-when-compile
  (require 'use-package))
(require 'diminish)                ;; if you use :diminish
(require 'bind-key)                ;; if you use any :bind variant
(setq use-package-always-ensure t
      use-package-minimum-reported-time 0.03
      use-package-verbose t)

;; configure the chrome
(set-default-font "DejaVu Sans Mono 9")
