Skip to content

Instantly share code, notes, and snippets.

@twlz0ne
Created December 12, 2017 02:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save twlz0ne/c8fed9503ee89df09080257967a66c17 to your computer and use it in GitHub Desktop.
Save twlz0ne/c8fed9503ee89df09080257967a66c17 to your computer and use it in GitHub Desktop.
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