   ;; http://www.mail-archive.com/help-gnu-emacs@gnu.org/msg03577.html
  ))
 
-;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-; 2. Change the looking of modeline
-;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-;;; Helper function
-(defun evil-generate-mode-line-tag (&optional state)
-  "Generate the evil mode-line tag for STATE."
-  (let ((tag (evil-state-property state :tag t)))
-    ;; prepare mode-line: add tooltip
-    (if (stringp tag)
-        (propertize tag
-		    'face 'font-lock-preprocessor-face
-                    'help-echo (evil-state-property state :name)
-                    'mouse-face 'mode-line-highlight)
-      tag)))
-;; set tags for evil state to fit this new modline
-(set (evil-state-property 'normal :tag) "N")
-(set (evil-state-property 'insert :tag) "I")
-(set (evil-state-property 'visual :tag) "V")
-(set (evil-state-property 'operator :tag) "O")
-(set (evil-state-property 'replace :tag) "R")
-(set (evil-state-property 'motion :tag) "M")
-(set (evil-state-property 'emacs :tag) "E")
-
-(setq-default mode-line-format
-  (list
-
-    ;; the buffer name; the file name as a tool tip
-    '(:eval (propertize "%b " 'face 'font-lock-keyword-face
-        'help-echo (buffer-file-name)))
-
-    ;; was this buffer modified since the last save?
-    '(:eval (if (buffer-modified-p)
-	      "[+] "
-	      ""))
-
-    ;; line and column
-    "<" ;; '%02' to set to 2 chars at least; prevents flickering
-      (propertize "%02l" 'face 'font-lock-type-face) ","
-      (propertize "%02c" 'face 'font-lock-type-face)
-    "> "
-
-    "[" ;; Display mode of evil
-    '(:eval (evil-generate-mode-line-tag evil-state))
-
-    ;; is this buffer read-only?
-    '(:eval (if buffer-read-only
-              (propertize "R"
-                             'face 'font-lock-type-face
-                             'help-echo "Buffer is read-only")
-	      "-"))
-    "] "
-
-    ;; the current major mode for the buffer.
-    "["
-
-    '(:eval (propertize "%m" 'face 'font-lock-string-face
-              'help-echo buffer-file-coding-system))
-    "] "
-
-    ;; relative position, size of file
-    "["
-    (propertize "%p" 'face 'font-lock-constant-face) ;; % above top
-    "/"
-    (propertize "%I" 'face 'font-lock-constant-face) ;; size
-    "] "
-
-    ;; ;; elscreen modeline
-    ;; '(:eval elscreen-e21-mode-line-string)
-    ;; perspective modline
-    ;; '(:eval persp-modestring)
-    '(:eval persp-lighter)
-
-    ;; add the time, with the date and the emacs uptime in the tooltip
-    '(:eval (propertize (format-time-string " %H:%M")
-              'help-echo
-              (concat (format-time-string "%c; ")
-                      (emacs-uptime "Uptime:%hh"))))
-    " --"
-    ;; i don't want to see minor-modes; but if you want, uncomment this:
-    ;; minor-mode-alist  ;; list of minor modes
-    "%-" ;; fill with '-'
-    ))
-(force-mode-line-update t)
-
 ;============================================================
 ; Settings by Emacs Groups
 ;============================================================

      (package-refresh-contents)
      (package-install 'use-package)))
(require 'use-package)

;;; color theme
(use-package zenburn-theme

    (define-key evil-normal-state-map (kbd "C-p") 'sk)
    (evil-leader/set-key "/" 'ag)))

;;;-----------------------------------------------------------------------------
;;; spaceline for modeline
(use-package spaceline-config
  :ensure spaceline
  :init
  (setq ns-use-srgb-colorspace nil)
  :config
  (progn
    (spaceline-spacemacs-theme)
    (setq spaceline-highlight-face-func 'spaceline-highlight-face-evil-state)))

;;;============================================================================
;;; Filetype specified configuration

