mirror of
https://github.com/abo-abo/avy.git
synced 2025-12-04 20:55:43 +00:00
avy.el (avy-action-zap-to-char): More convenient use-cases
Use case 1:
Start (cursor is |):
This is my sentence and |there is some description
avy-goto-char "d" in description, action "z" results in:
This is my sentence and |description
Use case 2:
Same start;
avy-goto-char "t" in "This", action "z" results in:
|there is some description
The nice thing is that the both sequences are reversible with "C-y".
Fixes #234.
This commit is contained in:
parent
08370cdbc3
commit
58e8636d32
4
avy.el
4
avy.el
@ -691,8 +691,8 @@ Set `avy-style' according to COMMMAND as well."
|
|||||||
(defun avy-action-zap-to-char (pt)
|
(defun avy-action-zap-to-char (pt)
|
||||||
"Kill from point up to PT."
|
"Kill from point up to PT."
|
||||||
(if (> pt (point))
|
(if (> pt (point))
|
||||||
(kill-region (point) (1+ pt))
|
(kill-region (point) pt)
|
||||||
(kill-region pt (1+ (point)))))
|
(kill-region pt (point))))
|
||||||
|
|
||||||
(defun avy-action-teleport (pt)
|
(defun avy-action-teleport (pt)
|
||||||
"Kill sexp starting on PT and yank into the current location."
|
"Kill sexp starting on PT and yank into the current location."
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user