avy.el (avy-action-yank-line): Add and bind to "Y"

This commit is contained in:
Oleh Krehel 2020-03-24 16:28:30 +01:00
parent 3bf83140fa
commit 954774d6e9

6
avy.el
View File

@ -192,6 +192,7 @@ If the commands isn't on the list, `avy-style' is used."
(?m . avy-action-mark) (?m . avy-action-mark)
(?n . avy-action-copy) (?n . avy-action-copy)
(?y . avy-action-yank) (?y . avy-action-yank)
(?Y . avy-action-yank-line)
(?i . avy-action-ispell) (?i . avy-action-ispell)
(?z . avy-action-zap-to-char)) (?z . avy-action-zap-to-char))
"List of actions for `avy-handler-default'. "List of actions for `avy-handler-default'.
@ -713,6 +714,11 @@ Set `avy-style' according to COMMAND as well."
(yank) (yank)
t) t)
(defun avy-action-yank-line (pt)
"Yank sexp starting at PT at the current point."
(let ((avy-command 'avy-goto-line))
(avy-action-yank pt)))
(defun avy-action-kill-move (pt) (defun avy-action-kill-move (pt)
"Kill sexp at PT and move there." "Kill sexp at PT and move there."
(goto-char pt) (goto-char pt)