From 411a7812adb17832e5a0c1d1c7d1563990574090 Mon Sep 17 00:00:00 2001 From: syl20bnr Date: Wed, 1 Apr 2015 21:51:42 -0400 Subject: [PATCH] Rename spacemacs/helm-projectile-dwim to spacemacs/helm-projectile-search-dwim --- spacemacs/packages.el | 56 +++++++++++++++++++++++-------------------- 1 file changed, 30 insertions(+), 26 deletions(-) diff --git a/spacemacs/packages.el b/spacemacs/packages.el index 71ca5334c..6accf1b3a 100644 --- a/spacemacs/packages.el +++ b/spacemacs/packages.el @@ -1590,32 +1590,36 @@ ARG non nil means that the editing style is `vim'." helm-projectile-switch-project helm-projectile-vc) :init - (defconst spacemacs-use-helm-projectile t - "This variable is only defined if helm-projectile is used.") - (setq projectile-switch-project-action 'helm-projectile) - (defun spacemacs/helm-projectile-dwim () - (interactive) - (progn - (call-interactively (cond ((executable-find "ag") - 'helm-projectile-ag) - ((executable-find "ack") - 'helm-projectile-ack) - ((executable-find "pt") - 'helm-projectile-pt) - (t - 'helm-projectile-grep))))) - (evil-leader/set-key - "/" 'spacemacs/helm-projectile-dwim - "pa" 'helm-projectile-ag - "pA" 'helm-projectile-ack - "pb" 'helm-projectile-switch-to-buffer - "pd" 'helm-projectile-find-dir - "pe" 'helm-projectile-recentf - "pf" 'helm-projectile-find-file - "pg" 'helm-projectile-grep - "ph" 'helm-projectile - "ps" 'helm-projectile-switch-project - "pv" 'helm-projectile-vc))) + (progn + (setq projectile-switch-project-action 'helm-projectile) + + (defconst spacemacs-use-helm-projectile t + "This variable is only defined if helm-projectile is used.") + + (defun spacemacs/helm-projectile-search-dwim () + "Execute the first found search tool." + (interactive) + (call-interactively + (cond ((executable-find "pt") + 'helm-projectile-pt) + ((executable-find "ag") + 'helm-projectile-ag) + ((executable-find "ack") + 'helm-projectile-ack) + (t 'helm-projectile-grep)))) + + (evil-leader/set-key + "/" 'spacemacs/helm-projectile-search-dwim + "pa" 'helm-projectile-ag + "pA" 'helm-projectile-ack + "pb" 'helm-projectile-switch-to-buffer + "pd" 'helm-projectile-find-dir + "pe" 'helm-projectile-recentf + "pf" 'helm-projectile-find-file + "pg" 'helm-projectile-grep + "ph" 'helm-projectile + "ps" 'helm-projectile-switch-project + "pv" 'helm-projectile-vc)))) (defun spacemacs/init-helm-pt () (use-package helm-pt