Skip to content

Instantly share code, notes, and snippets.

@bling
Last active September 5, 2018 00:02
Show Gist options
  • Save bling/18655e86918bebd7bc3d to your computer and use it in GitHub Desktop.
Save bling/18655e86918bebd7bc3d to your computer and use it in GitHub Desktop.
(defvar helm-fzf-source
(helm-build-async-source "fzf"
:candidates-process 'helm-fzf--do-candidate-process
:nohighlight t
:requires-pattern 2
:candidate-number-limit 9999))
(defun helm-fzf--do-candidate-process ()
(let* ((cmd-args `("fzf" "-x" "-f" ,helm-pattern))
(proc (apply #'start-file-process "helm-fzf" nil cmd-args)))
(prog1 proc
(set-process-sentinel
proc
(lambda (process event)
(helm-process-deferred-sentinel-hook
process event (helm-default-directory)))))))
(defun helm-fzf (directory)
(interactive "D")
(let ((default-directory directory))
(helm :sources '(helm-fzf-source)
:buffer "*helm-fzf*")))
@nicot
Copy link

nicot commented Dec 19, 2015

Are you on an SSD? This works really quickly for me. I forked it to here for some better defaults for me. Thanks for the script!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment