       ;;shell
       (evil-leader/set-key-for-mode 'shell-mode "mH" 'spacemacs/helm-shell-history)
 
+      (defun spacemacs/helm-edit ()
+        "Switch in edit mode depending on the current helm buffer."
+        (interactive)
+        (cond
+         ((string-equal "*helm-ag*" helm-buffer)
+          (helm-ag-edit))))
+
       (defun spacemacs//helm-navigation-ms-on-enter ()
         "Initialization of helm micro-state."
         ;; faces

        ("<RET>" helm-maybe-exit-minibuffer :exit t)
        ("?" nil :doc (spacemacs//helm-navigation-ms-full-doc))
        ("a" helm-select-action :post (spacemacs//helm-navigation-ms-set-face))
        ("h" helm-previous-source)
        ("j" helm-next-line)
        ("k" helm-previous-line)


(defun spacemacs/init-helm-ag ()
  (use-package helm-ag
    :defer t
    :config
    (evil-define-key 'normal helm-ag-map "SPC" evil-leader--default-map)))

(defun spacemacs/init-helm-c-yasnippet ()
  (use-package helm-c-yasnippet
