Closed karambaq closed 6 years ago
Avy sorts paths in order that they appear in the buffer. This is both simple and consistent.
But I see how your suggestion could be a useful improvement. I even think it was suggested somewhere before.
It should not be too difficult to implement: just sort the lst
argument to avy-tree
in order of closeness to the point position. Maybe someone could make a PR? Otherwise, I'll implement this myself later.
It'll be great. Unfortunately I'm not in good relationships with lisp, I'll try to find someone in r/emacs.
Thanks, please test.
@abo-abo Perfect, thanks so much!
@abo-abo Is it possible to get this behavior for avy-goto-word
as well? :)
@lshoravi You can customize it like this:
(add-to-list 'avy-orders-alist '(avy-goto-word-1 . avy-order-closest))
Fantastic! Thank you :+1:
Hello, I'm ex-vimmer, in vim I used easymotion to jumping, and here the example what I mean:
Emacs avy:
Vim-easymotion:
As you can see, in vim closest jumps to current position usually a one symbol reference, with avy it almost always to two symbols