                         (this-fn thing)))))
           (funcall func dir)))
 
-      ;; Search in buffers ---------------------------------------------------
-
-      (defun spacemacs//helm-do-ag-buffers (&optional _)
-        "Wrapper to execute `helm-ag-buffers.'"
-        (helm-do-ag-buffers))
-
-      (defun spacemacs/helm-buffers-do-ag-region-or-symbol ()
-        "Search in opened buffers with `ag' with a default input."
-        (interactive)
-        (spacemacs//helm-do-ag-region-or-symbol 'spacemacs//helm-do-ag-buffers))
-
-      (defun spacemacs/helm-buffers-do-ack (&optional _)
-        "Search in opened buffers with `ack'."
-        (interactive)
-        (let ((helm-ag-base-command "ack --nocolor --nogroup"))
-          (helm-do-ag-buffers)))
-
-      (defun spacemacs/helm-buffers-do-ack-region-or-symbol ()
-        "Search in opened buffers with `ack' with a default input."
-        (interactive)
-        (spacemacs//helm-do-ag-region-or-symbol 'spacemacs/helm-buffers-do-ack))
-
-      (defun spacemacs/helm-buffers-do-pt (&optional _)
-        "Search in opened buffers with `pt'."
-        (interactive)
-        (let ((helm-ag-base-command "pt --nocolor --nogroup"))
-          (helm-do-ag-buffers)))
-
-      (defun spacemacs/helm-buffers-do-pt-region-or-symbol ()
-        "Search in opened buffers with `pt' using a default input."
-        (interactive)
-        (spacemacs//helm-do-ag-region-or-symbol 'spacemacs/helm-buffers-do-pt))
-
-      (defun spacemacs/helm-buffers-smart-do-search
-          (&optional arg default-inputp)
-        "Search in opened buffers using `dotspacemacs-search-tools'.
-Search for a search tool in the order provided by `dotspacemacs-search-tools'
-If ARG is non nil then `ag' and `pt' and ignored.
-If DEFAULT-INPUTP is non nil then the current region or symbol at point
-are used as default input."
-        (interactive "P")
-        (call-interactively
-         (spacemacs//helm-do-search-find-tool "helm-buffers-do"
-                                              (spacemacs//get-search-tools arg)
-                                              default-inputp)))
-
-      (defun spacemacs/helm-buffers-smart-do-search-region-or-symbol
-          (&optional arg)
-        "Search in opened buffers using `dotspacemacs-search-tools' with
-default input.
-Search for a search tool in the order provided by `dotspacemacs-search-tools'
-If ARG is non nil then `ag' and `pt' and ignored."
-        (interactive "P")
-        (spacemacs/helm-buffers-smart-do-search arg t))
-
-      ;; Search in files -----------------------------------------------------
-
-      (defun spacemacs/helm-do-ag-region-or-symbol ()
-        "Search with `ag' with a default input."
-        (interactive)
-        (spacemacs//helm-do-ag-region-or-symbol 'helm-do-ag))
-
-      (defun spacemacs/helm-do-ack (&optional dir)
-        "Search with ack using `helm-ag'"
-        (interactive)
-        (let ((helm-ag-base-command "ack --nocolor --nogroup"))
-          (helm-do-ag dir)))
-
-      (defun spacemacs/helm-do-ack-region-or-symbol ()
-        "Search with ack using `helm-ag' using a default input."
-        (interactive)
-        (spacemacs//helm-do-ag-region-or-symbol 'spacemacs/helm-do-ack))
-
-      (defun spacemacs/helm-do-pt (&optional dir)
-        "Search with the platinum searcher using `helm-ag.'"
-        (interactive)
-        (let ((helm-ag-base-command "pt --nocolor --nogroup"))
-          (helm-do-ag dir)))
-
-      (defun spacemacs/helm-do-pt-region-or-symbol ()
-        "Search with pt using `helm-ag' using a default input."
-        (interactive)
-        (spacemacs//helm-do-ag-region-or-symbol 'spacemacs/helm-do-pt))
-
-      ;; Search in project ---------------------------------------------------
-
-      (defun spacemacs/helm-project-do-ag ()
-        "Search with ag using `helm-ag' in project"
-        (interactive)
-        (let ((dir (projectile-project-root)))
-          (if dir
-              (helm-do-ag dir)
-            (message "error: Not in a project."))))
-
-      (defun spacemacs/helm-project-do-ag-region-or-symbol ()
-        "Search with `ag' with a default input in project."
-        (interactive)
-        (let ((dir (projectile-project-root)))
-          (if dir
-              (spacemacs//helm-do-ag-region-or-symbol 'helm-do-ag dir)
-            (message "error: Not in a project."))))
-
-      (defun spacemacs/helm-project-do-ack ()
-        "Search with ack using `helm-ag' in project"
-        (interactive)
-        (let ((dir (projectile-project-root)))
-          (if dir
-              (spacemacs/helm-do-ack dir)
-            (message "error: Not in a project."))))
-
-      (defun spacemacs/helm-project-do-ack-region-or-symbol ()
-        "Search with ack using `helm-ag' using a default input in project."
-        (interactive)
-        (let ((dir (projectile-project-root)))
-          (if dir
-              (spacemacs//helm-do-ag-region-or-symbol 'spacemacs/helm-do-ack dir)
-            (message "error: Not in a project."))))
-
-      (defun spacemacs/helm-project-do-pt ()
-        "Search with pt using `helm-ag' in project"
-        (interactive)
-        (let ((dir (projectile-project-root)))
-          (if dir
-              (spacemacs/helm-do-pt dir)
-            (message "error: Not in a project."))))
-
-
-      (defun spacemacs/helm-project-do-pt-region-or-symbol ()
-        "Search with pt using `helm-ag' using a default input in project."
-        (interactive)
-        (let ((dir (projectile-project-root)))
-          (if dir
-              (spacemacs//helm-do-ag-region-or-symbol 'spacemacs/helm-do-pt dir)
-            (message "error: Not in a project."))))
-
       (defun spacemacs//helm-do-search-find-tool (base tools default-inputp)
         "Create a cond form given a TOOLS string list and evaluate it."
         (eval

           (define-key map (kbd "s") (lambda ()
                                       (interactive)
                                       (let ((helm-ag-insert-at-point 'symbol))
                                         (spacemacs/helm-smart-do-search))))
           map) nil)
        (let* ((i 0)
               (overlay-count (length ahs-overlay-list))


      (defun spacemacs/helm-project-smart-do-search-region-or-symbol
          (&optional arg)
        "Search in current project using `dotspacemacs-search-tools' with
 default input.
Search for a search tool in the order provided by `dotspacemacs-search-tools'
If ARG is non nil then `ag' and `pt' and ignored."
        (interactive "P")
        (spacemacs/helm-project-smart-do-search arg t))

      ;; evilify the helm-grep buffer
      (evilify helm-grep-mode helm-grep-mode-map
               (kbd "RET") 'helm-grep-mode-jump-other-window
               (kbd "q") 'quit-window)

      (evil-leader/set-key
        ;; quick search in project
