       (defconst spacemacs-use-helm-projectile t
         "This variable is only defined if helm-projectile is used.")
 
-      (defun spacemacs/helm-projectile-pt ()
-        "Perform a search with the platinum searcher using `helm-projectile.'"
-        (interactive)
-        (if (configuration-layer/package-usedp 'helm-ag)
-            (let ((helm-ag-base-command "pt -e --nocolor --nogroup"))
-              (call-interactively 'helm-projectile-ag))
-          (message "error: helm-ag not found.")))
-
-      (defun spacemacs/helm-projectile-ack ()
-        "Perform a search with ack using `helm-projectile.'"
-        (interactive)
-        (if (configuration-layer/package-usedp 'helm-ag)
-            (let ((helm-ag-base-command "ack --nocolor --nogroup"))
-              (call-interactively 'helm-projectile-ag))
-          (message "error: helm-ag not found.")))
-
-      (when (configuration-layer/package-usedp 'helm-ag)
-        (defun spacemacs/helm-projectile-ag-region-or-symbol (&optional options)
-          "Version of `spacemacs/helm-do-ag-region-or-symbol' that
-defaults to searching the current project. Requires \"ag\" search tool."
-          (interactive)
-          (unless (executable-find "ag")
-            (error "ag not available"))
-          (if (require 'helm-ag nil  'noerror)
-              (if (projectile-project-p)
-                  (let* ((grep-find-ignored-files
-                          (-union (projectile-ignored-files-rel)
-                                  grep-find-ignored-files))
-                         (grep-find-ignored-directories
-                          (-union (projectile-ignored-directories-rel)
-                                  grep-find-ignored-directories))
-                         (ignored
-                          (mapconcat (lambda (i)
-                                       (concat "--ignore " i))
-                                     (append grep-find-ignored-files
-                                             grep-find-ignored-directories)
-                                     " "))
-                         (helm-ag-command-option options)
-                         (helm-ag-base-command (concat helm-ag-base-command
-                                                       " " ignored)))
-                    (spacemacs/helm-do-ag-region-or-symbol
-                     (projectile-project-root)))
-                (error "You're not in a project"))
-            (error "helm-ag not available"))))
-
-      (defun spacemacs//helm-projectile-do-search-find-tool (tools)
-        "Create a cond form given a TOOLS string list and evaluate it."
-        (eval `(cond
-                ,@(mapcar (lambda (x)
-                            `((executable-find ,x)
-                              ',(let ((func (intern
-                                             (format "spacemacs/helm-projectile-%s"
-                                                     x))))
-                                  (if (fboundp func)
-                                      func
-                                    (intern (format "helm-projectile-%s" x))))))
-                          tools)
-                (t 'helm-do-grep))))
-
-      (defun spacemacs/helm-projectile-smart-do-search (&optional arg)
-        "Execute the first found search tool in `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."
-        (interactive "P")
-        (let ((tools
-               (if arg
-                   (delq nil (mapcar (lambda (x)
-                                       (and (not (member x '("ag" "pt"))) x))
-                                     dotspacemacs-search-tools))
-                 dotspacemacs-search-tools)))
-          (call-interactively (spacemacs//helm-projectile-do-search-find-tool
-                               tools))))
-
-      (defun spacemacs/helm-projectile-ag-symbol ()
-        "Perform a search of project files with ag using
-`helm-ag.' Defaults to symbol at point."
-        (interactive)
-        (let ((helm-ag-insert-at-point 'symbol))
-          (call-interactively 'helm-projectile-ag)))
-
-      (defun spacemacs/helm-projectile-ack-symbol ()
-        "Perform a search of project files with ack using
-`helm-ag.' Defaults to symbol at point."
-        (interactive)
-        (let ((helm-ag-insert-at-point 'symbol))
-          (spacemacs/helm-projectile-ack)))
-
-      (defun spacemacs/helm-projectile-pt-symbol ()
-        "Perform a search of project files with the platinum
-searcher using `helm-ag.' Defaults to symbol at point."
-        (interactive)
-        (let ((helm-ag-insert-at-point 'symbol))
-          (spacemacs/helm-projectile-pt)))
-
       (evil-leader/set-key
-        "/"   'spacemacs/helm-projectile-smart-do-search
         "pb"  'helm-projectile-switch-to-buffer
         "pd"  'helm-projectile-find-dir
         "pe"  'helm-projectile-recentf
         "pf"  'helm-projectile-find-file
         "ph"  'helm-projectile
         "pp"  'helm-projectile-switch-project
-        "psa" 'helm-projectile-ag
-        "psA" 'spacemacs/helm-projectile-ag-symbol
         "psg" 'helm-projectile-grep
-        "psk" 'spacemacs/helm-projectile-ack
-        "psK" 'spacemacs/helm-projectile-ack-symbol
-        "psp" 'spacemacs/helm-projectile-pt
-        "psP" 'spacemacs/helm-projectile-pt-symbol
         "pv"  'projectile-vc))))
 
 (defun spacemacs/init-helm-swoop ()

                  (this-fn targets recurse zgrep exts default-input input)))))
          (call-interactively 'helm-do-grep)))

      (defun spacemacs//helm-do-search-find-tool (tools default-inputp)
        "Create a cond form given a TOOLS string list and evaluate it."
        (eval
         `(cond
           ,@(mapcar
              (lambda (x)
                `((executable-find ,x)
                  ',(let ((func
                           (intern
                            (format (if default-inputp
                                        "spacemacs/helm-do-%s-region-or-symbol"
                                      "spacemacs/helm-do-%s")
                                    x))))
                      (if (fboundp func)
                          func
                        (intern (format "helm-do-%s" x))))))
                     tools)
           (t 'helm-do-grep))))

      (defun spacemacs/helm-smart-do-search (&optional arg default-inputp)
        "Execute the first found search tool in `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")
        (let ((tools
               (if arg
                   (delq nil (mapcar (lambda (x)
                                       (and (not (member x '("ag" "pt"))) x))
                                     dotspacemacs-search-tools))
                 dotspacemacs-search-tools)))
          (call-interactively (spacemacs//helm-do-search-find-tool
                               tools default-inputp))))

      (defun spacemacs/helm-smart-do-search-region-or-symbol (&optional arg)
        "Execute the first found search tool in `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-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)

      (defun spacemacs/last-search-buffer ()
        "open last helm-ag or hgrep buffer."
        (interactive)

                                                   "projectile-bookmarks.eld"))
      (unless (boundp 'spacemacs-use-helm-projectile)
        (evil-leader/set-key
          "pb" 'projectile-switch-to-buffer
          "pd" 'projectile-find-dir
          "pe" 'projectile-recentf
