Make helm-find-files backspace behave like Ido

To make it easier for people to switch to helm-find-files from Ido.
This commit is contained in:
Tu Do 2015-05-07 18:24:54 +07:00 committed by syl20bnr
parent 24da945166
commit a68a75f028

View file

@ -1307,6 +1307,12 @@ Example: (evil-map visual \"<\" \"<gv\")"
helm-recentf-fuzzy-match t
helm-semantic-fuzzy-match t)
(defun spacemacs/helm-find-files-navigate-back (orig-fun &rest args)
(if (= (length helm-pattern) (length (helm-find-files-initial-input)))
(helm-find-files-up-one-level 1)
(apply orig-fun args)))
(advice-add 'helm-ff-delete-char-backward :around #'spacemacs/helm-find-files-navigate-back)
(defun spacemacs/helm-do-ack ()
"Perform a search with ack using `helm-ag.'"
(interactive)