Skip to content

Instantly share code, notes, and snippets.

@twlz0ne
Created December 12, 2017 02:19
Embed
What would you like to do?
avy-goto-helm-buffer-line.el
(defun avy-goto-helm-buffer-line ()
(interactive)
(let ((final nil)
(begin (or (bound-and-true-p avy-goto-helm-buffer-line-begin) 2)))
(save-excursion
(switch-to-buffer helm-buffer)
(goto-line begin)
(let* ((avy-all-windows nil)
(r (avy--line
nil (line-beginning-position) (window-end))))
(unless (eq r t)
(avy-action-goto r)
(previous-line)
(setq final r)))
(other-window -1)
(when final
(helm-next-line)
(helm-maybe-exit-minibuffer)))))
;; Usage
;; (define-key helm-map (kbd "C-l") 'avy-goto-helm-buffer-line)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment